In this paper, we consider a ground terminal (GT) to an unmanned aerial vehicle (UAV) wireless communication system where data from GTs are collected by an unmanned aerial vehicle. We propose to use the ground terminal-UAV (G-U) region for the energy consumption model. In particular, to fulfill the data collection task with a minimum energy both of the GTs and UAV, an algorithm that combines optimal trajectory design and resource allocation scheme is proposed which is supposed to solve the optimization problem approximately. We initialize the UAV’s trajectory firstly. Then, the optimal UAV trajectory and GT’s resource allocation are obtained by using the successive convex optimization and Lagrange duality. Moreover, we come up with an efficient algorithm aimed to find an approximate solution by jointly optimizing trajectory and resource allocation. Numerical results show that the proposed solution is efficient. Compared with the benchmark scheme which did not adopt optimizing trajectory, the solution we propose engenders significant performance in energy efficiency.