Crop production structure and layout is a traditional research content of agricultural geography, and the research on the evolution characteristics and mechanism of crop production pattern can provide some reference for the optimal allocation of regional agricultural production elements. In this paper, we use the location Gini coefficient, gravity center movement model and comparative advantage index to reveal the evolution characteristics of the production pattern of four major crops, i.e., grain, sugar, fruits and vegetables, in Guangxi from 1995-2019 and their formation mechanism, and accordingly put forward relevant optimization suggestions. The results showed that grain crops "retreating", and sugar, fruits and vegetables "advancing" constitute the basic situation of the major crops competition. In terms of spatial distribution, the grain and vegetables are relatively scattered, the sugar production has an obvious trend of geographical agglomeration, and the fruit production has moved from relative concentration to dispersion. The scale comparative advantage of major crops dominates the aggregated comparative advantage, and the weak position of grain production is gradually strengthened. Sugar production has the absolute scale and aggregated comparative advantages. Fruits and vegetables have a prominent scale comparative advantage, but the efficiency comparative advantage needs improvement. The combination of forces such as the constraints of resource endowments, the dominance of market supply and demand and comparative efficiency, the inducement of changes of rural social development factors, the guidance or correction of institutional environment, and the circular accumulation of agglomeration economy, all together drive the evolution of crop production patterns. The unique regional situation determines that Guangxi's crop production should coordinate economic, social and ecological functions, and promote the transformation of crop production from scale expansion to comprehensive benefit enhancement by adjusting production structure, optimizing the spatial layout and strengthening industrial agglomeration.