Most of the existing harmonic detection methods are often confronted with the problems of huge calculation load and weak timeliness. To tackle these problems, a practical harmonic detection and compensation strategy is designed based on quasi-fixed-frequency multiple second-order generalized integrators and multiple proportional resonant controllers. This strategy utilizes the quasi-fixed-frequency multiple second-order generalized integrators to extract the fundamental and harmonic components of the load current in real time and then employs the multiple proportional resonant controllers to generate the compensating current, which reduces the harmonic content of the power grid current. Simulation and experimental results show that the designed strategy can exactly detect the harmonic components and effectively reduce the total harmonic distortion, while overcoming the problems of huge calculation load and weak timeliness of existing methods.