Fly ashes recovered from the particulate control devices at six pulverized coal boiler unites of China, are studied using an X-ray photoelectron spectroscopy (XPS) with a particular focus on the functionalities of fluorine (F), chlorine (Cl), carbon and oxygen on fly ash. It is found that the inorganic forms of F and Cl are predominant on the ash surface in comparison with their organics, and the proportion of organic Cl is relatively higher than that of organic F. Similar results are also obtained in the bulk by correlating the F and Cl contents with those of the unburnt carbon and other compositions in ash. Strong correlations of mercury retention with surface carbon–oxygen functional groups indicate that the CO, OH/CO and (OCO)O on surface are of significant importance for mercury retention in fly ash. Their surface concentrations are related to coal type. The presence of Cl in fly ash helps with mercury retention. No obvious effect of F is observed.