Most of the harmonics in the DC system exist in the form of superposition on the DC component. In order to achieve accurate analysis of such mixed signals, a DC component recovery method is proposed for harmonic analysis. According to the additivity principle of the windowed Fourier transform, the windowed Fourier transform of the mixed signal does not affect the respective analysis results of the DC component and the harmonic component, therefore, it is not necessary to filter the DC component, the accurate analysis of DC and harmonic components is achieved, as well as retaining the integrity of harmonic signal analysis. By analyzing the influence of windowed Fourier transform on the amplitude of DC component, it is proposed to recover the transformed amplitude by DC component recovery coefficient, and the harmonic component is corrected by double-peak spectral line interpolation to further improve the analysis accuracy. The simulation results verify the effectiveness of the proposed method and the implementation process is simple.