In mobile wireless sensor networks, localization accuracy and cost are the key issues to be considered. This paper is committed to solving the localization problem of mobile sensor networks. We propose an improved Black Hole (BH) algorithm based on compact strategy and elitist learning strategy. An improved Monte Carlo localization (IMCL) algorithm based on multi-hop combines the novel algorithm to deal with the localization problem of mobile sensor networks. The performance of the novel algorithm is verified on 28 test functions of CEC 2013 and compared with other standard optimization algorithms. The results reveal that the novel algorithm has first-class performance. In the simulation experiment, the novel algorithm and several optimization algorithms are applied to IMCL. The comparison results show that the new heuristic algorithm combined with IMCL can provide more competitive results in mobile node localization.