AbstractThe consumption of dissolved oxygen (DO) during the corrosion of commercially pure magnesium specimens was investigated by localized corrosion techniques. The concentration of oxygen and the local current density on the near‐surface of magnesium were measured simultaneously by a micro‐optode DO sensor and the scanning vibrating electrode technique (SVET), respectively. Diamond microelectrodes were also used for DO mapping. Significant DO depletion was found since the initial immersion time of Mg in NaCl 0.5 m, and a correlation could be established between DO consumption and areas of anodic and cathodic activity. These findings assume particular relevance for the corrosion of Mg alloys or magnesium components with impurity levels higher than the tolerance limit. Moreover, this study points out the significance of the partial oxygen pressure as an influential parameter during magnesium corrosion.