With the increasing popularity of high-speed rail, the establishment of mobile data channels between high-speed trains and ground to meet the needs of vehicle data transmission and passenger Internet access has become an increasingly urgent issue. The existing solutions of GSM-R and LTE-R still exist such problems as small bandwidth, large delay, and unstable transmission. To this end, this study uses Mobile Edge Computing (MEC) to optimize the high-speed communication network. The main idea is to deploy an MEC server in the high-speed rail and the base station. Under two levels of MEC server cooperation, the solution can reuse air interface links, improve wireless transmission stability, and reduce latency. Finally, users will get a better experience. The actual network test results show that the scheme can significantly improve the transmission rate and reduce the transmission delay.