Positioning is a fundamental issue for sensor network operation. Knowledge of accurate node location is essential in such network deployment. Many papers in this field focus on anchor-based solutions. The use of anchors introduces many limitations, since anchors require external equipments such as GPS, and that causes additional power consumption. Eliminating the requirement of anchors in this paper, a competent anchor-free algorithm is presented for distributed localization in sensor networks. Previous localization algorithms assume that there exist some anchor nodes, and then other nodes are estimated to create their coordinates. Once there are not anchors to be deployed, those localization techniques will be invalidated. The novel algorithm is proposed to create some virtual anchors and a virtual coordinate system, which is executed in a distributed fashion with a measured distance between two adjacent nodes. The neighbor information is adopted, and the intermediate estimations of nodes are measured for position mutation according to their reliability criterions. Thus the positioning optimization process of the whole network is avoided falling into a local optimal solution. Simulation results prove that the algorithm can reliably resolve the anchor-free localization problem. It is superior to previously proposed methods in terms of its ability to compute correct coordinates and the global-energy-ratio objective under a variety of conditions.