This paper investigates the impact of the digital economy on urban environmental pollution by analyzing panel data from 283 prefecture-level cities in China from 2011 to 2019 and using the digital technology comprehensive pilot zone of China as a natural experiment. The results demonstrate that digital technology has a significant effect in reducing pollutant emissions and empowering urban environmental governance. The findings are proven to be robust based on various tests, including parallel trend, PSM-DID, and placebo tests. Our analysis further shows that digital technology is particularly effective in controlling pollution in old industrial areas, high digital areas, and low energy efficiency areas. We also find that the national digital technology integrated pilot zone can mitigate environmental pollution in prefecture-level cities by increasing public environmental awareness and encouraging green technology innovation. Moreover, our research indicates that digital technology-enabled urban pollution control can contribute to the formation of a new urbanization pattern in China. These findings provide valuable insights for promoting the digital economy and achieving the goal of carbon reduction in China.