Spark anodizing (SA) has been developed as a novel technique for corrosion protection by forming a ceramic layer on magnesium alloys, in which the fluoride in the electrolyte recipes plays a key role during coating. In the present work, the SA ceramic layer produced on AZ91D magnesium alloy was characterized by using SEM, TEM and EDS. The results showed that: 1) there was a fluoride enriched zone around 1-2µm in thickness at the coating/substrate interface, which was composed of the amorphous substrate, nanocrystal MgO particles sized in 20-60nm and sealed cavities; 2) the oxygen content in the inner layer was higher than that in the outer layer, while the fluorine content was relative even in both layers, which suggested that the barrier layer was included in this fluoride zone, and that the fluorine may be only a retained marker during the formation of new coating materials.