In the context of the coordinated development of digital economy and environmental protection, we take the strategy of "Broadband China" as a quasi-natural experiment, adopts the panel data of 284 cities from 2007 to 2020, and evaluates the policy effect of digital economy on total factor energy efficiency through the progressive DID model. The results show that: The construction of "Broadband China" demonstration city has significantly promoted the improvement of the total factor energy efficiency of the demonstration city, but there is also significant urban heterogeneity, which is manifested in the significant improvement of the total factor energy efficiency of the eastern city, the southern city, the big city and the non-resource-based city. It has no significant effect on the total factor energy efficiency of central and western cities, northern cities, small and medium-sized cities and resource-based cities. The construction of "Broadband China" demonstration cities can improve total factor energy efficiency by promoting technological progress and strengthening environmental regulations. Therefore, we should further strengthen the construction of digital infrastructure and give full play to its positive effects. Different cities should seek differentiated development paths based on their own resource endowments and development conditions, so that the digital economy can effectively improve the total factor energy efficiency.