Exploring the effect and mechanism of farmland transfer on agricultural green total factor productivity (AGTFP) in China is of great significance for exerting the effectiveness of China’s farmland transfer policy and promoting green agricultural development. Based on panel data from 30 provinces from 2005 to 2020, this paper applies a two-way fixed effects model to analyze the impact of farmland transfer on AGTFP, and the mechanism of farmland transfer on AGTFP is also investigated. We find that farmland transfer has a significant and sound promoting effect on AGTFP, with respect to multiple robustness checks; there is heterogeneity regarding the impact of farmland transfer on AGTFP in terms of food functions, and farmland transfer can promote regional AGTFP through nonagricultural labor transfer and agricultural technology utilization. When considering the fact that farmland transfer has increased China’s AGTFP, the Chinese government should continue to adhere to the farmland transfer policy, accelerate nonagricultural labor transfer, improve the level of agricultural technology utilization, and ultimately promote green agricultural development.