Maize is the largest food crop in China, which has a profound impact on China’s food security. Based on the gravity center model, the moving direction, distance and moving speed of the center of gravity of maize production and consumption in China from 1999 to 2022 were calculated using geographic information system (GIS), and the spatial matching of production and consumption were analyzed using the coupling model. Combined with natural, economic, political and other factors, the reasons for the change were studied. The results showed that the center of gravity of maize production in China moved from southwest to northeast from 1999 to 2022, moving 148.55 km to the northeast, with an average moving speed of 6.46 km·a-1. The center of gravity of corn consumption showed the general characteristics of circular change from southwest to northeast to southeast to southwest to northeast, and the stage characteristics were obvious. The coupling distance between the center of gravity of production and consumption showed the overall characteristics of rising first and then decreasing, but the increase was far greater than the decrease. The coupling distance changed from 471.02 km (1999) to 513.02 km (2022), and the center of gravity coupling distance reached the maximum value of 557.91 km in 2013. Since 2020, the coupling distance between maize production and consumption had increased again, and the spatial matching had declined again, which had brought challenges to food security in the new era. Therefore, some suggestions were proposed, such as optimizing the corn regional interest coordination mechanism, building a multi-agent interest linkage mechanism and support policy system, optimizing the spatial pattern of maize regional production and consumption, and implementing regionally differentiated food policies.