To address the problem of slow speed and low accuracy for recognizing and locating the explosive source in complex shallow underground blind spaces, this paper proposes an energy-focusing-based scanning and localization method. First, the three-dimensional (3D) energy field formed by the source explosion is reconstructed using the energy-focusing properties of the steered response power (SRP) localization model, and the velocity field is calculated based on a multilayered stochastic medium model by considering the random statistical characteristics of the medium. Then, a power function factor is introduced to quantum particle swarm optimization (QPSO) to search for and solve the above energy field and to approach the real location of the energy focus point. Additionally, the initial population is constructed based on the logistic chaos model to realize global traversal. Finally, extensive simulation results based on the real-world dataset show that compared to the baseline algorithm, the focusing accuracy of the energy field of the proposed scheme is improved by 117.20%, the root mean square error (RMSE) is less than 0.0551 m, the triaxial relative error (RE) is within 0.2595%, and the average time cost is reduced by 98.40%. It has strong advantages in global search capability and fast convergence, as well as robustness and generalization.