Forests, as a critical component of terrestrial ecosystems, have long been recognized for their vital roles as water, money, grain, and carbon repositories, collectively known as the “Four Repositories” concept. The significance of forests in the context of economic and ecological development has become increasingly prominent. As a novel economic paradigm and a new driver of growth, the digital economy () can significantly improve the management, operation, and preservation of forests, thus offering new prospects for advancing the high-quality development of forestry () in China. This study constructs indicator systems for the levels of and using panel data from 30 provinces in China over the period from 2012 to 2021. The empirical analysis utilizes a fixed effect model to assess the influence of in promoting in China. Moreover, the mediation analysis model is employed to examine the underlying mechanisms. There are four main results as follows. First, the baseline regression results show that can directly drive in China. Second, the mechanism analysis reveals that positively influences through three mediating channels: strengthening environmental regulation, enhancing public environmental awareness, and increasing innovation in forestry. Third, the heterogeneity analysis indicates that the positive impact of on is more pronounced in northern provinces, economically advanced regions, and provinces with stronger fiscal support for forestry. Fourth, further analysis reveals significant spatial spillover effects of on in China. The study findings not only clarify the driving mechanisms of in , but also provide valuable policy insights for exploring practical pathways for in China in the modern context.