As one of the key technologies of wireless sensor networks (WSNs), the localization of mobile nodes (MN) is one of the most significant research topics in WSNs. When a line-of-sight (LOS) channel is available, accuracy localization result can be obtained. Motivated by the fact that the non-line-of-sight (NLOS) propagation of signal is ubiquitous and decreases the accuracy of localization, we propose a MN localization algorithm in mixed LOS/NLOS environments. Considering the characteristics of NLOS error, we propose a localization algorithm based on vote selection mechanisms to filter the distance measurements and reserve the reliable measurements. Then a modified probabilistic data association algorithm is proposed to fuse the multiple measurements reserved from the vote selection. The position of the MN is finally determined by a linear least squares algorithm based on reference nodes selection. This algorithm effectively mitigates various kinds of NLOS errors and largely improves the localization accuracy of the MN in mixed LOS/NLOS environments. The simulation and experiments results show that the proposed algorithm has better robustness and higher localization accuracy than other methods.