Resource-rich regions can fall prey to the resource curse, leading to a decline in carbon emissions efficiency (CEE). But amid this challenge, building digital infrastructure offers an opportunity to find solutions that will pave the way for sustainable development. An indicator evaluation system was constructed to measure the level of digital infrastructure (DI) using panel data for 275 Chinese cities from 2010 to 2020. The impact of DI on CEE is validated using several econometric models. As an innovation, the time lag effect and spatial spillover effects are considered in the analysis. The study found that DI significantly improves CEE, and this effect is more effective in central and resource-based cities, but only significant in southern cities, cities with high levels of marketization, and cities with high levels of human capital. Reducing the resource curse and increasing green technological innovation are important transmission pathways, which are considered to be the key role of DI. Further, the third period of lagged DI has the most significant effect, and there is a positive spatial spillover effect of DI on the CEE of neighboring cities, which is most prominent around 600 km. Policymakers are advised to improve the level of construction of DI, focus on digital management, and utilize the role of DI at the optimal time and distance.