For problems of fence effect and spectrum leakage of harmonic detection method based on Fourier transformation, the paper proposed a harmonic detection method based on improved wavelet packet transformation. The method achieves uniform division of signal band, makes harmonic frequencies concerned fall on the center of frequency band of wavelet packet by selecting appropriate sampling frequency and wavelet packet decomposition tree, so as to reduce spectrum leakage and effectively improve accuracy of spectrum analysis. Experimental results verify effectiveness of the harmonic detection method based on improved wavelet packet transformation.