The invention relates to the underwater active positioning field and particularly relates to an underwater two-dimensional space active electric field positioning method based on a particle swarm optimization algorithm. According to the method, a detected object is positioned through an underwater active electric field, especially for a metal object, influence of complex factors including darkness and turbidity of the underwater environment can be solved, and detection reliability and validity are improved. Starting from the basic theory of an electromagnetic field, an active electric field positioning mechanism of a light current fish is simulated, underwater positioning precision is improved to a millimeter magnitude level, moreover, a local optimal deadlock can be avoided, underwater detection validity and searching optimization are improved, the method is suitable for commercialization development, as underwater detection steps are gradually accelerated, underwater positioning technology requirements are wider and wider, and relatively good business development prospects and application values are realized.