In order to study the accurate measurement of electric energy in complex industrial field, a method of harmonic electric energy measurement based on wavelet packet decomposition and reconstruction algorithm, as well as the calculation formula of harmonic power and the principle of harmonic electric energy measurement are proposed. Using db42 wavelet function to carry out harmonic energy metering simulation analysis, the results show that: The fundamental frequency of the simulation signal is 50 Hz, two-layer wavelet packet transform is adopted, the simulation input signals within 40 fundamental wave cycles are taken, and the sampling frequency fs is 800 Hz. Conclusion: The three-phase harmonic energy metering device based on virtual instrument technology has realized the measurement of each harmonic active power and reactive power, and the accuracy reaches 0.2 s.