The digital economy, as a driving force for the development of emerging economies, has received the attention of the party and the state. At the same time, haze pollution, as the "culprit" that has plagued my country's economic development and people's quality of life for a long time, has received extensive attention from the whole society. Therefore, on the basis of measuring the level of data economy at the city level, combined with the pm2.5 data of haze pollution and related economic statistics, this paper discusses the relationship between the development level of digital economy and haze pollution in cities at the theoretical and empirical levels. The research results found that: (1) The improvement of the digital economy can effectively suppress the haze pollution in various cities. This result is still valid after considering the substitution variables and controlling the samples of large cities and other robustness tests. (2) The digital economy can suppress haze pollution through two paths: the level of urban innovation and the upgrading of urban industrial structure. (3) Heterogeneity research shows that the inhibitory effect of haze pollution of the digital economy has a greater effect on cities with a lower level of digital economy and northern cities. These research results complement the existing digital economy development and haze pollution control.