In this paper, a method of electric energy measurement based on instantaneous reactive power theory is put forward according to the deficiency that power under different frequency will be offset at the same time under the non sinusoidal and unbalanced condition. By changing the rotation direction and velocity of the coordinate system in the generalized three-phase instantaneous reactive power theory, we can obtain the positive and negative sequence voltage and current of any harmonic in the three-phase three-line system. Then the positive and negative sequence power can be converted to phase power, thus the system power under nonsinusoidal and unbalanced condition is obtained. This method can calculate the power of different harmonics, avoiding the unreasonable phenomena of power under different frequency be offset, and the calculation of this method is small and the calculation accuracy is high. Finally, the method is validated by Matlab simulation.