This paper proposed a high-precision and high-order power voltage harmonics detection method based on STM32H7. The system which uses STM32H7 as the core utilizes FFT-FT algorithm to find the peak of panoramic spectrum to further refine the spectrum and compensate amplitude error, so as to achieve high precision real-time power voltage harmonics measurement. The input voltage is attenuated, amplified whose gain is programmed, and input into STM32 MCU after digital-to-analog. Then, the harmonic amplitude is measured through searching the fundamental frequency after the FFT of voltage signal. This system adopts one-dimensional linear search algorithm to improve its real-time performance. The actual test results show the absolute error is less than or equal to 0.01Hz and the relative error is less than 0.03% for the frequency measurement in the range of 40~70Hz AC voltage. And the harmonic amplitudes' absolute error of rectangular wave is less than or equal to 4mV. In particular, the relative error of the fundamental wave and the third harmonic is less than 0.5%, and the absolute error of the 63rd harmonic is only 1mV. Therefore, the system has the characteristics of high-orders of harmonic measurement, high precision of frequency and amplitude measurement, which can meet the application requirements of high precision and high order harmonics measurement in power system.