This paper employs the entropy method to construct a comprehensive digital economy development index from three dimensions: infrastructure construction, industrial scale, and technological application, aiming to accurately measure the digital economy level across 271 Chinese cities. Using multiple regression and a mediating effect model, this study empirically tests the inhibitory effect and transmission mechanisms of the digital economy on carbon emissions. The results show that the digital economy reduces carbon emissions by promoting green technology diffusion and industrial structure optimization. Furthermore, regional heterogeneity analysis indicates that the emission reduction effect is more significant in central and western cities with strong technology absorption capacity, as digital technology supports their green transformation during industrial relocation and amplifies emission reduction potential.