Investigations of AZ91D revealed a strong influence of mainly the following microstructural parameters on corrosion: porosity, the eutectic, the Al-content of the Mg-phase as well as the volume fraction and distribution of gamma-Al12Mg17. Further an improved corrosion resistance was observed by the addition of rare earth elements. The influence of Ce on microstructure and corrosion of sand cast and high pressure die cast AZ91D with 0.5-2.0 wt.% Ce was investigated by SEM before and after potentiodynamic polarization measurements in pH7.5 (bi-distilled water adjusted with KOH). It was observed that Ce significantly improved the corrosion resistance by changing the microstructure. A strong influence of Ce on the average grain size, the fraction of the eutectic, changes in morphology and/or volume fraction of gamma Al12Mg17 and formation of a Ce-rich intermetallic phase was observed. Therefore, not only the chemical composition but also the change of microstructure and the formation of micro-galvanic elements influence the local corrosion mechanism of AZ91D with cerium.