Based on the social network analysis method SNA and expanding gravity model, this study explores the network structure characteristics and influencing factors of agricultural trade between China and SCO member countries in the Shanghai Cooperation Organization (SCO) from the perspective of international trade networks. Through the construction of the global agricultural trade network, it is found that from 2008 to 2024, the density of SCO regional trade network increased from 0.4834 to 0.6294, indicating that the trade links between member countries were significantly enhanced, and the intermediate central potential index decreased from 35.23% to 27.42%, reflecting the evolution of the trade network from “single-core” to “multi-core” structure. The regression results of the extended gravity model show that China’s economic scale β=0.384 and the economic level of SCO countries β=0.378 have a significant positive effect on agricultural exports, while geographic distance β=-0.843 shows an inhibitory effect, and institutional factors such as common language also play a potential role. The endogeneity test and spatial correlation analysis further verify the robustness of the model. The article’s study of agricultural trade in the SCO is beneficial to China’s food production storage in order to dynamically regulate the national strategy of balancing food supply and demand, and to ensure the quality and safety of agricultural products and security of supply.