Air pollution has seriously hindered China’s sustainable development. The impact mechanism of industrial upgrading on air pollution is still unclear, given the rapid digital economy. It is necessary to analyze the impact of industrial structure upgrading on air pollution through the digital economy. To investigate the impact of industrial upgrading and the digital economy on air pollution, this paper selected the industrial advanced index and the digital economy index to construct a panel regression model to explore the improvement effect of industrial upgrading on air pollution and selected China’s three typical areas to construct a zonal regression model. The concentrations of air pollutants showed a downward trend during 2013–2020. Among them, the SO2 concentration decreased by 63%, which is lower than the PM2.5 and NO2 concentrations. The spatial pattern of air pollutants is heavier in the north than in the south and heavier in the east than in the west, with the North China Plain being the center of gravity. These air pollutants have significant spatial spillover effects, while local spatial correlation is dominated by high-high and low-low clustering. Industrial upgrading has a stronger suppressive effect on the PM2.5 concentration than the suppressive effect on the SO2 and NO2 concentrations, while the digital economy has a stronger improvement effect on the SO2 concentration than its improvement effect on the PM2.5 and NO2 concentrations. Industrial upgrading has a stronger improvement effect on air pollution in the Yangtze River Delta urban agglomeration than in Beijing–Tianjin–Hebei and its surrounding areas, while the improvement in air pollution attributable to the digital economy in Beijing–Tianjin–Hebei and its surrounding areas is stronger than in the Yangtze River Delta urban agglomeration. There are significant differences in the effects of industrial upgrading and the digital economy on the various types of air pollutants.