Size-segregated aerosols were collected in Urumqi, a megacity in northwest China, during two heating seasons, i.e., before (heating season І: January–March 2012) and after (heating season II: January–March 2014) the project “shifting coal to natural gas”, and determined for n-alkanes, PAHs and oxygenated PAHs to investigate the impact of replacement of coal by natural gas on organic aerosols in the urban atmosphere. Our results showed that compared to those in heating season I concentrations of n-alkanes, PAHs and OPAHs decreased by 74%, 74% and 82% in heating season II, respectively. Source apportionment analysis suggested that coal combustion, traffic emission and biomass burning are the major sources of the determined organics during the heating seasons in Urumqi. Traffic emission is the main source for n-alkanes in the city. Coal combustion is the dominant source of PAHs and OPAHs in heating season І, but traffic emission becomes their major source in heating season ІI. Relative contributions of coal combustion to n-alkanes, PAHs and OPAHs in Urumqi decreased from 21 to 75% in heating season I to 4.0–21% in heating season II due to the replacement of coal with natural gas for house heating. Health risk assessment further indicated that compared with that in heating season I the number of lung cancer related to PAHs exposure in Urumqi decreased by 73% during heating season II due to the project implementation. Our results suggest that replacing coal by clean energy sources for house heating will significantly mitigate air pollution and improve human health in China.