This paper designs a single-cell multiuser massive MIMO-MEC network. In order to ensure the fairness of users, a joint pilot transmission, data transmission and resource allocation model during the computation execution process with the goal of minimizing the maximum offload computing delay for all users is constructed. The resulted problem is non-convex and non-linear optimization, thus difficult to be solved optimally. To tackle this challenge, an improved fruit fly optimization algorithm (FOA) based on the external penalty function steepest descent algorithm (IFOA-PFSA) is proposed. The point obtained by the steepest descent algorithm based on the external penalty function has been employed as the initial point of the fruit fly optimization algorithm, which can greatly reduce the population size and the maximum number of iterations in the random search process of the traditional fruit fly optimization algorithm, reducing the algorithm complexity. Simulation results show that the proposed algorithm IFOA-PFSA has a smaller delay than the traditional FOA (TFOA) algorithm. The complexity of the proposed algorithm is also lower than the TFOA algorithm. INDEX TERMS Mobile edge computing, massive MIMO, resource allocation, power control. WEIHENG JIANG (Member, IEEE) received the Ph.D. degree in communication and information systems from Chongqing University, Chongqing, China, in 2015. He is currently a Tutor with the College of Microelectronics and Communication Engineering, Chongqing University. His main research interests include wireless communication and networking, mobile sensing and computing, and low-energy, and passive sensor networks. He serves as a Reviewer for international journals, such as International Journal of Distributed Sensor Network and TPC for international conferences such as PIMRC.