This paper proposes a method that combines window functions with compressed sensing for the detection of ultra-high harmonics in the frequency range of 2–150 kHz. By analyzing the sparsity of the signal, the Bruckmann window function, which is most suitable for the compressed sensing reconstruction process and the characteristics of ultra-high harmonics, is selected. Simulations indicate that, compared to existing methods, the proposed algorithm based on the fusion of the Bruckmann window and compressed sensing achieves a sparser post-observation signal with reduced fluctuations. The robustness and anti-interference capabilities are enhanced, while the harmonic detection accuracy and signal reconstruction performance are significantly improved. The reconstruction error reaches 4.15 × 10−6, the mean squared error percentage (MSE) reaches 4.13 × 10−6, and the signal-to-noise ratio (SNR) is as high as 97.69 dB, marking an increase of 54.11%. This study provides a new theoretical and methodological approach for the analysis and processing of ultra-high harmonics caused by a high proportion of power electronic devices.