In recent years, the strategic focus of the world's maritime military has gradually shifted from deep waters to shallow waters and ports and other waters. Therefore, countries have increased investment in R&D for small target monitoring in shallow waters. The MP-MUSIC algorithm-based underwater active electric field localization technology can significantly reduce the environmental requirements for underwater detection, and the technology is simple and easy to implement. In this paper, we first analyze the passive localization problem of underwater electric dipole sources, derive the localization technique of underwater targets based on active electric fields by combining the Rasnow model, and transform the localization problem into the problem of finding the optimal solution. The global optimal solution is found to localize the target by applying the MP-MUSIC algorithm. Finally, peripheral hardware circuits are also designed. The test results of the real object prove that the device can achieve accurate localization.