IntroductionGiven the dual constraints of limited resources and environmental concerns, achieving green development in agriculture helps to enhance national food security, resource security, and ecological security.MethodsUtilizing panel data sourced from 30 provinces within China, spanning the years from 2001 to 2021, this paper employs the super-efficiency Slack-Based Measure (SBM) model and the Global Malmquist-Luenberger (GML) index to measure agricultural green total factor productivity (AGTFP). It utilizes methods such as the stepwise Differences in Differences (DID), mediation effect models, and moderating effect models to systematically explore the impact of the implementation of Free Trade Pilot Zones (FTPZs) on AGTFP and its mechanisms of action.ResultsThe study finds: (1) Establishing FTPZs significantly boosts AGTFP, indicating a profound positive influence; (2) The promotional effect of FTPZs on AGTFP is stronger in the eastern and central regions, as well as in major grain-producing areas; (3) FTPZs may enhance AGTFP by promoting the effect of agricultural structure upgrading, i.e., a transmission mechanism exists from FTPZs to the agricultural structure upgrading effect to AGTFP; (4) The agricultural scale effect plays a positive moderating role in the impact of FTPZs on AGTFP.DiscussionIt is advisable to optimize agricultural measures related to FTPZs, promote agricultural structural upgrading and scale enhancement, adapt strategies to local conditions to advance green agricultural development, and thereby promote the coordinated development of FTPZs and AGTFP.