Economic growth in the Beijing–Tianjin–Hebei region has been achieved by consuming large amounts of fossil fuels. This produces a large number of pollutants, which damage the physical and mental health of residents, and prevent sustainable economic development. The most urgent task at present is improving the quality of the environment. This paper takes carbon emission as a pollution index, and adopts an extended stochastic impacts by regression on population, affluence, and technology (STIRPAT) model in order to study the impact of the optimization of industry structure (in particular the reduction of the proportion of energy-intensive secondary industry), the optimization of the energy structure, and technological improvements on the atmospheric environmental quality. We obtain some important and enlightening discoveries. First of all, the rapid economic growth that has been based on magnanimous fossil fuel consumption is still the main reason for the deterioration of the atmospheric environment. This means that the main driving force of economic growth still comes from high pollution industries, despite a strategy for the transformation of the pattern of economic growth having been proposed for many years. Second, the optimization of the industrial structure has not played a significant role in promoting the reduction of carbon emissions. Through further research, we believe that this may be due to the low-quality development of the third industry. In other words, the traditional service industry related to high energy consumption accounts for a large proportion in regional total output, while the high-end service industry related to small pollution accounts for a relatively small proportion. Third, reducing the consumption of coal and improving the technological level can effectively curb the deterioration of the environmental quality. In addition, we find that transboundary pollution is an important factor affecting the environment in this region, and the earnings of any unilateral treatment action is small. As a result, joint pollution control under the supervision of the central government can produce greater benefits. Therefore, we believe that the transition of the economic growth pattern, and the optimization of the energy and industry structures (especially developing the high-end service industry) are effective ways to improve the environmental quality.