Whether digital village construction can effectively promote agriculture’s green development is essential for modernizing agriculture and rural areas. Using panel data from 30 provinces in China between 2011 and 2022, this study empirically examines the relationship between digital village construction and agroecological efficiency and explores its mechanism of action and threshold effect, contributing to the exploration of agricultural digitization and sustainable development. This study shows that (1) AEE is positively associated with digital village construction; (2) the positive association size varies in regions and construction levels; (3) agricultural land transfer and technological innovation play a mediating role in the positive effect; and (4) there is a single threshold value for the positive effect of digital village construction, and after crossing the threshold value, its marginal effect shows a positive and increasing nonlinear characteristic. This study enhances our comprehension of digital village development to advance agroecological efficiency and offers theoretical insights and policy recommendations for optimizing the rural digital infrastructure and fostering sustainable agricultural growth.