Traditional particle swarm optimization (PSO) localization method can achieve good localization accuracy with the advantages of fewer parameters and simpler calculations. However, its localization performance is constrained by the limited ranging information available between the anchor node and the unknown node. Thus, an improved PSO localization method is proposed to further improve the localization performance. Firstly, we use the ranging information between the unknown node and the anchor node to make an initial positioning through the traditional PSO method. Then, based on the initial positioning, all ranging information is employed to calculate a more precise location. Compared with the traditional PSO method, the proposed algorithm can reduce the impact of the ranging error and improve localization performance.