Intelligent reflective surface (IRS) and unmanned aerial vehicle (UAV) communication are two key technologies in the sixth generation of mobile communication (6G). In this paper, IRS is equipped on UAV to form aerial IRS, which can achieve 360° panoramic full-angle reflection and flexible deployment of IRS. In order to achieve high-quality and ubiquitous network coverage under data privacy and low latency requirements, we propose an Federated learning (FL) network via Over-the-Air computation (AirComp) in IRS-assisted UAV communications. Our goal is to minimize the worst-case mean square error (MSE) by jointly optimizing the IRS phase shift, denoising factor for noise suppression, the user’s transmission power, and UAV trajectory. Optimizing and quickly adjusting the UAV position and IRS phase shift, it flexibly assists the signal transmission between users and base stations (BS). In order to solve this complex non-convex problem, we propose a low-complexity iterative algorithm, which divides the original problem into four sub-problems, respectively using the semi-definite programming (SDP) method, slack variable introduction method, successive convex approximation (SCA) method to solve each sub-problem. Through the analysis of simulation results, our proposed design scheme is obviously better than other benchmark schemes.