In order to improve the harmonic compensation performance of active power filter (APF) in distribution network, based on deadbeat control theory, the command current prediction algorithm and current tracking control strategy are optimized in this paper. Firstly, the command current repetitive prediction in abc coordinate system is transferred to dq for improving its accuracy in lead compensation, and the equivalent for fractional delay beat is achieved by Lagrange Interpolation Polynomial to solve the problem of inaccurate prediction caused by grid frequency fluctuation. Then, considering the inherent halfsampling-period delay of sinusoidal PWM (SPWM), an improved deadbeat control strategy for current tracking is proposed by estimating the output current of next sampling period. Because the output current in next sampling period is replaced by that in current sampling period with traditional deadbeat control strategy, this estimation could make up for the defect of low control precision caused by that replacement. After that, adding error repetitive correction into the improved deadbeat control channel to reduce the periodic tracking error of output current. Finally, the stability and accuracy of the improved control system are analyzed theoretically, and its feasibility and effectiveness are verified by the simulation and hardwarein-the-loop (HIL) experiments.