Equipping an unmanned aerial vehicle (UAV) with a mobile edge computing (MEC) server is an interesting technique for assisting terminal devices (TDs) to complete their delay sensitive computing tasks. In this paper, we investigate a UAV-assisted MEC network with air–ground cooperation, where both UAV and ground access point (GAP) have a direct link with TDs and undertake computing tasks cooperatively. We set out to minimize the maximum delay among TDs by optimizing the resource allocation of the system and by three-dimensional (3D) deployment of UAVs. Specifically, we propose an iterative algorithm by jointly optimizing UAV–TD association, UAV horizontal location, UAV vertical location, bandwidth allocation, and task split ratio. However, the overall optimization problem will be a mixed-integer nonlinear programming (MINLP) problem, which is hard to deal with. Thus, we adopt successive convex approximation (SCA) and block coordinate descent (BCD) methods to obtain a solution. The simulation results have shown that our proposed algorithm is efficient and has a great performance compared to other benchmark schemes.