This paper proposes a nonlinear Lyapunov-based control method of the single-phase shunt active power filter (APF). The system is modeled firstly and then the compensated current of the APF is calculated. The energetic like Lyapunov function is constructed and the control output is determined through ensuring the differential of the Lyapunov function negative, which grantee the convergence of the APF system. Considering that the time-varying load may cause greater fluctuations in DC voltage, an average value is used to calculate the control output. A globally stable control is possible and it is insensitive to the parameter uncertainties and robustness to the disturbances. Simulation results are obtained using Matlab/ Simulink. These results verify the correct operation of the proposed control method.