Fast and accurate localization of randomly deployed nodes is required by many applications in wireless sensor networks (WSNs). However, mobile nodes localization in WSNs is more difficult than static nodes localization since the nodes mobility brings more data. In this paper, we propose a Range-based Monte Carlo Box (RMCB) algorithm, which builds upon the Monte Carlo Localization Boxed (MCB) algorithm to improve the localization accuracy. This algorithm utilizes Received Signal Strength Indication (RSSI) ranging technique to build a sample box and adds a preset error coefficient in sampling and filtering phase to increase the success rate of sampling and accuracy of valid samples. Moreover, simplified Particle Swarm Optimization (sPSO) algorithm is introduced to generate new samples and avoid constantly repeated sampling and filtering process. Simulation results denote that our proposed RMCB algorithm can reduce the location error by 24%, 14% and 14% on average compared to MCB, Range-based Monte Carlo Localization (RMCL) and RSSI Motion Prediction MCB (RMMCB) algorithm respectively and are suitable for high precision required positioning scenes.