Magnetic anomaly detection is a detection technology for underwater/underground ferromagnetic targets. In the geomagnetic anomaly area, the change of magnetic feld is very complicated, and the detection ability of traditional detection methods will decline sharply. To solve this problem, we construct a high-precision local geomagnetic map, which turns geomagnetic anomalies into known prior information to assist detection. Firstly, the accuracy of local geomagnetic map is improved by the optimized variation function of interpolation algorithm and an efficient mapping strategy. Secondly, the magnetic target detector assisted by geomagnetic map is designed on basis of BP neural network and its internal structure is optimized. Finally, simulation and experiment were carried out. The results show that the method improves the detection performance in the geomagnetic anomaly area by 75%–80%, and well-adapted to low SNR situations. This proposed method makes the detection of geomagnetic anomaly are effective.