Many cities in China have invested the city’s rail transit system to reduce urban air pollution and traffic congestion. Earlier studies rarely compare the effects of rail transit on urban air quality in different cities, providing little guidance to urban planners in solving traffic congestion and air quality. By using the rail transit lines in Chengdu and Nanchang as case studies, this paper attempts to examine the effect of rail transit on air pollution. Data were collected from 18 monitoring stations distributed along the chosen rail transit lines in both cities during the period 2014 to 2016 and analyzed using the regression discontinuity design to address the potential endogenous location of subway stations. The results show that subway opening in Nanchang has a better reductions from automobile exhaust than that in Chengdu, specifically, carbon monoxide pollution, one key tailpipe pollutant, experienced a 10.23% greater reduction after Nanchang Metro Line 1 opened. On the contrary, the point estimate for carbon monoxide in Chengdu is 22.42% and statistically significant at the 1% level. Nanchang Metro Line 1 does play an important role in road traffic externalities, but the benefit was not huge enough to change the overall air quality. On the contrary, the opening of the Chengdu Metro Line 4 is unlikely to yield improvements in air quality.