According to the time-varying and nonlinear characteristics of grid connected inverter, BP neural network with adaptive learning rate and momentum factor is applied to quasi-PR controller, which improves the adaptive ability of the system and reduces the distortion of the grid current. Firstly, the harmonic compensation link is designed, which constitutes a new transfer function for the higher-order odd harmonics’ frequency, and then detect the 3-order, 5-order and 7-order harmonics with higher content in the error current, and applies the improved BP neural network to adaptively adjust the compensation. The method accelerates the convergence rate and improves compensation accuracy. Matlab/simulink simulation results show that compared with quasi-PR control, the neural network quasi-PR control method decreases the total harmonic distortion of tracking current, increases the dynamic response performance, and improve the stability of the system.