This paper examines the impact of renewable energy heating on air quality in China, using the Qinling Mountains–Huaihe River line as a quasi-natural experiment to distinguish between regions with central heating and those without. Employing a difference-in-differences approach and analyzing panel data from 298 cities between 2014 and 2022, our findings indicate that the renewable energy heating policy has significantly improved air quality. Specifically, the policy led to substantial improvements in air quality, reducing concentrations of key pollutants: SO2 by 28.31%, CO by 7.57%, NO2 by 5.72%, and PM2.5 by 7.15%. The policy’s effects are most pronounced in regions with lower temperatures and in the eastern parts of the country. Further analysis emphasizes the critical role of energy transition, environmental regulations, and government investment in technology as key drivers of these air quality improvements.