Under the background of the construction of novel power system, the large-scale integration of new energy sources has brought new challenges to the measurement of electric energy in the power grid. Due to the characteristics of the existing electricity meter in the rapid transformation of power flow and high harmonic content, it is impossible to accurately judge the direction of electric energy, and the accumulation of electric energy is inaccurate. In this paper, an analog-to-digital converter sampling circuit that can meet the higher harmonic metering is designed to solve the problem of inaccurate electrical energy accumulation, and the metering algorithm of electricity meter is improved and verified based on the circuit. The test results show that the standard deviation of harmonic measurement of the electricity meter is only 0.0005, and the variation does not exceed 0.01%, and the improved ADC sampling and the improved algorithm meet the 60th higher harmonic measurement.