The energy internet proposed recently provides a potential solution to address the increasingly serious world energy issues. Solving the power quality problem properly is one of the key problems of the energy internet to be developed adequately in the future. Considering the power quality issue caused by the nonlinear and imbalance loads widely existing in the energy internet, an imbalance and harmonic compensation strategy is proposed based on the energy router in this paper. The imbalance and harmonic compensation controllers are also developed in detail. Simulation results from MATLAB/SIMULINK are provided to demonstrate the validity and efficiency of the proposed method.