The mobile node location method can find unknown nodes in real time and capture the movement trajectory of unknown nodes in time, which has attracted more and more attention from researchers. Due to their advantages of simplicity and efficiency, intelligent optimization algorithms are receiving increasing attention. Compared with other algorithms, the black hole algorithm has fewer parameters and a simple structure, which is more suitable for node location in wireless sensor networks. To address the problems of weak merit-seeking ability and slow convergence of the black hole algorithm, this paper proposed an opposition-based learning black hole (OBH) algorithm and utilized it to improve the accuracy of the mobile wireless sensor network (MWSN) localization. To verify the performance of the proposed algorithm, this paper tests it on the CEC2013 test function set. The results indicate that among the several algorithms tested, the OBH algorithm performed the best. In this paper, several optimization algorithms are applied to the Monte Carlo localization algorithm, and the experimental results show that the OBH algorithm can achieve the best optimization effect in advance.