Summary The successful recovery of hydrogeophysical parameters through surface-NMR measurements depends on the quality of the signal, which can be significantly degraded by harmonics from multiple noise sources with different fundamental frequencies in urban areas. Accurate estimation of the fundamental frequencies of harmonics is the main step in harmonic noise cancellation-based methods. The existing 1D and 2D model-based approaches involve a computationally expensive process that sets limits for processing of large surface-NMR data sets. In addition, the classical Nyman, Gaiser, and Saucier estimation (NGSE) algorithm, despite its fast implementation, may not accurately recover harmonic components when there is no prior knowledge of the expected value of the frequency offset between the true fundamental frequencies and their nominal values. This lack of knowledge can make it difficult to accurately estimate the maximum number of harmonics and, consequently, result in an incorrect recovery of the fundamental frequency. To surmount these limitations, we propose an enhanced version of the NGSE approach based on an efficient maximum number of harmonics search approach to process surface-NMR signals corrupted by powerline harmonics with both single and multiple frequency content. We verify the efficiency of our algorithm on a synthetic dataset embedded in simulated powerline harmonic signals, and real electromagnetic noise recordings, as well as a real surface-NMR data set. Our numerical experiments confirm that the proposed algorithm can retrieve the multiple fundamental frequencies simultaneously with a significant speedup ranging from 4 to 87 times, depending on whether the signal has single, dual, or triple frequency content, in the overall computation time compared to the model-based methods.