To achieve high-precision vector measurement values in a geomagnetic field, it is necessary to develop methods for overcoming alternating magnetic interference (AMI), which is generated by electrical equipment. This paper proposes the adaptive alternating magnetic interference suppression (AAIS) algorithm. In this algorithm, first, only a triaxial fluxgate sensor measures the magnetic field data. The time–frequency diagram of the total magnetic field is obtained quickly through short-time Fourier transform and wavelet transform. Additionally, the time and frequency of AMI appearance are analyzed. Then, the triaxial adaptive notch filter suppresses the three-component related magnetic interference. Herein, simulation and actual experiments are performed to verify the effectiveness of AAIS. The results indicate that the algorithm can quickly detect the frequencies of AMI from the total magnetic field and adaptively fit their amplitude and phase on the vector magnetic field. Finally, AAIS can suppress the interference effectively. The AAIS algorithm realizes error compensation for the vector measurement values by the total magnetic field, which effectively improves the vector measurement accuracy of the geomagnetic field. We highlight that the AAIS algorithm is effective for AMIs of different frequencies, numbers, and intensities without reference sensors. Our work has practical implications in airborne, vehicle-mounted, and shipborne geomagnetic vector detection.