In this article, intelligent reflecting surface (IRS) aided an unmanned aerial vehicle (UAV) data collection system is investigated, where an IRS is deployed to assist in the communication from a cluster of Internet‐of‐Things (IoT) devices to a UAV in the presence of a jammer. We aim to improve the energy efficiency (EE) via the joint design of UAV trajectory, IRS passive beamforming, device power allocation and communication scheduling. However, the formulated nonlinear fractional programming problem is challenging to solve due to its nonconvexity and coupled variables. To overcome the difficulty, we propose an alternating optimization based algorithm to solve it sub‐optimally by leveraging the Dinkelbach's algorithm, successive convex approximation (SCA) technique, and block coordinate descent (BCD) method. Extensive simulation results show that the proposed design can significantly improve the anti‐jamming performance. In particular, for the remote jammer case, the proposed design can largely shorten the flight path and thus decrease the energy consumption via the signal enhancement; while for the local jammer case, which is deemed highly challenging in conventional systems without IRS since the retreating away strategy becomes ineffective, our proposed design even achieves a higher performance gain owing to the efficient jamming signal mitigation.