In process of the localization in WSN, the overhead of the whole network will increase with the number of anchor nodes added, and it’ll bring a lot of waste. Thus, in order to use less anchor nodes to achieve more precise localization, this paper proposes a range-free localization algorithm which is based on three mobile anchor nodes, the algorithm can guarantee that each unknown node can choose the anchor nodes which are not far away from itself to implement localization, and construct an optimization model to maximize the area of double overlay regions in the network. The results of simulation show that this algorithm can improve the precision of localization.