Based on the panel data of 114 Chinese resource-based cities from 2013 to 2022, this paper uses principal component analysis, Super-SBM and Malmquist index to measure the development level of digital economy and green total factor productivity of resource-based cities, and empirically studies the impact of digital economy on The impact effect and mechanism of green total factor productivity in resource-based cities. The research found that: (1)From 2013 to 2022, the overall green total factor productivity of resource-based cities in my country showed a trend of first decline and then an upward trend; (2) Digital economy can promote the improvement of green total factor productivity of resource-based cities, and digital economy has more long-term effects than short-term effects. (3)Mechanism analysis shows that energy efficiency and industrial struc-ture optimization are important paths for the digital economy to promote green total factor productivity in resource-based cities. (4)Heterogeneity research shows that digital economy has the largest effect on green total factor productivity in mature cities and the least effect on growth cities; From a regional perspective, the digital economy has the greatest effect on promoting re-source-based cities in the eastern region, followed by the central region, and the western region is weaker.