For sustainable agricultural development, increasing efforts are put on promoting agricultural mechanization and green agricultural development all over the world. Based on the panel data of Chinese provincial agriculture from 2002 to 2018, the System Generalized Method of Moments model and mediation model are constructed to explore the paths of agricultural mechanization affecting green agricultural development. The results show that agricultural mechanization can not only promote the green agricultural development directly but also indirectly by transferring the agricultural labor force and increasing fertilizer input. However, because of the surge of pesticide demand, agricultural mechanization also leads to serious pollution indirectly. With the development of large-scale agricultural machinery, the direct promotion of agricultural machinery on green agricultural development will be more significant. However, it will be less efficient to substitute more agricultural labor force with machinery power. The problem of pesticide abuse will also become more serious. Therefore, it is important for green agricultural development to encourage human capital investment in agricultural mechanization. In addition, more attention should be paid to improving the input efficiency of fertilizers and pesticides so that agriculture will be sustainable in production and the ecological environment.
In the context of China’s dual carbon target, Beijing, as the capital of China, should play an exemplary role in carbon emission reduction. On the premise of optimizing high-emission sectors such as coal and industry, Beijing is still a certain distance from the goal of carbon neutrality. Therefore, on the basis of Beijing’s energy resource endowment, considering Beijing’s economic development and carbon neutrality goals and scientifically and reasonably planning Beijing’s carbon emission reduction path are important tasks. We construct an energy structure optimization model to achieve the goal of carbon neutrality by 2050. The model analysis concludes that the residents and transportation sectors will account for a large proportion of Beijing’s total carbon emissions in the future. To achieve the goal of carbon neutrality, the electricity substitution of fossil energy and the high proportion of external power are two necessary measures, and the optimal path of carbon emission reduction is proposed.