UAV formation has a wide range of application value and development prospects. However,the nonlinear and coupling nature of UAV dynamic model and the uncertainties in practical applications limit its application. In order to solve the problem of model inaccuracy,an optimal formation controller design method based on data-driven adaptive dynamic programming(ADP)is proposed. It combines the theory of distributed consistency and linear quadratic correlation. First,a virtual leader-follower model is established,the UAV's nonlinear dynamics model is simplified into four linear subsystems,and their mutual influences are decoupled. Next,the formation controller is designed for each subsystem. Then,the stability of the algorithm is analyzed using Lyapunov stability theory. Finally,the stability and effectiveness of the proposed algorithm is verified.