This paper studies the impact of trade openness and the proportion of exporters on environmental quality through the scale, composition and technique effects from 1998 to 2007 using firm- and city-level data for 287 Chinese cities. Our results reveal that, on average, trade openness has a detrimental impact on the environment in Chinese cities, but this impact remains heterogeneous across regions. A higher proportion of exporters improves the environment in central and eastern cities while generating nevertheless more pollution in western cities. As regards the sector-specific impact, we find that the higher proportion of exporters in the mining and less-polluting manufacturing sectors in eastern cities diminishes the emissions of particulate matter 2.5 (PM2.5). Our finding also suggests that a pollution haven effect emerges in China at the city level. Finally, our results confirm the presence of an environmental Kuznets curve effect for the PM2.5 pollutant across Chinese cities.