This paper proposes a Monto Carlo based localization (MCL) algorithm for autonomous underwater vehicle (AUV) with a low-cost mechanical scanning imaging sonar (MSIS). As MSIS has a slow-sampling characteristic, its scan is distorted by the vehicle motion during the scan interval and the sonar readings are sparse. Our contribution is introducing this two-stage approach to overcome the shortages of MSIS to achieve accurate localization: 1) the scan formation module is devised to eliminate the motion induced distortion of sonar scan; 2) MCL is applied to estimate the AUV pose accurately by the Dead Reckoning (DR) result and the formed sonar scan. Results of simulation verify that the proposed algorithm performs well in terms of effectiveness and accuracy.