Audio magnetotellurics (AMT), as a commonly used passive geophysical technique, provides outstanding metal ore exploration capabilities based on the resistivity structure of the earth. However, the accuracy of AMT in translating geoelectrical structures decreases when the data collected in mining areas are of poor quality and contain complex anthropogenic noise, leading to distorted apparent resistivity-phase curves and posing significant challenges for mineral exploration. To effectively denoise AMT data, we develop a new denoising method that combines atom-profile updating dictionary learning (APrU) with the nucleus sampling attention mechanism (NSAM) sparse coding. First, we use APrU to accurately learn the characteristics of the noise in the AMT data; then, we apply the updated dictionary to perform sparse coding on the AMT data by NSAM to obtain the noise; finally, we subtract the noise from the original AMT data to obtain the denoised data. Our experimental results suggest that the proposed method can learn an overcomplete dictionary via the to-be-processed AMT data, thereby enabling the sparse representation of the noise within the learned dictionary. We also demonstrate the efficacy of this method with a set of field data collected from the Lu-Zong mining area, and the attained denoised data faithfully restore the geoelectrical structures with heightened accuracy. The findings confirm that the proposed method realizes the unsupervised learning of the AMT data and allows us to achieve precise denoising performance.