Faced with the challenges of increasing demand and expanding emissions, China’s mining industry is at a crucial stage of sustainable development. In the context of the new technological revolution and industrial transformation, researching how the digital economy can promote the growth of green total factor productivity (GTFP) in China’s mining industry, particularly against the backdrop of technological diversity, is vital for achieving sustainable development and carbon neutrality goals. This study utilizes the meta-frontier Malmquist–Luenberger (MML) index to analyze the dynamics of GTFP in China’s mining industry under technological heterogeneity. It thoroughly examines the direct and indirect impacts of the digital economy (DE) on GTFP and delves into the underlying mechanisms of these effects using the spatial Durbin model. The empirical results reveal a significant positive relationship between DE and GTFP, particularly pronounced in the areas of technical efficiency and technological catch-up. Notably, this study identifies the mediating role of industrial structural upgrading in linking DE and GTFP. Additionally, the observed spatial spillover effect of DE on local mining GTFP suggests that the influence of DE extends beyond the immediate regions within the mining sector. Based on these findings, the study presents policy recommendations, emphasizing the need to integrate cutting-edge digital technologies in mining to enhance environmental sustainability.