Based on panel data of 31 provinces (autonomous regions and municipalities) in China from 2011 to 2022, this paper empirically examines the impact of digitalization on the inputs and outputs of the agricultural production process, and thereby derives the effects and mechanisms by which digitalization empowers the growth of agricultural green total factor productivity. The study finds that agricultural and rural areas’ digitalization significantly improves agricultural green total factor productivity, and this promotion mainly comes from the improvement of technical efficiency. Further analysis shows that digitalization mainly reduces land input and labor input, increases expected output, and reduces undesired output during the agricultural production process to achieve an improvement in agricultural green total factor productivity, indicating that digitalization has altered the allocation of agricultural factors. Heterogeneity analysis finds that the effect of digitalization on the growth of agricultural green total factor productivity is more pronounced in the eastern regions, southern regions, and areas with higher levels of agricultural digitalization, indicating that the development of digitalization exacerbates the gap in agricultural green total factor productivity among regions.