An understanding of the anomalously enhanced hydrogen evolution reaction (HER) of magnesium (Mg) under anodic polarisation in aqueous corrosion is paramount for a predictive theory of its corrosion and metal electrocatalysis. Previous theoretical and experimental studies have proposed that sub-surface hydride phases play a role in this behaviour but the underlying atomic mechanisms remain unclear. By constructing theoretical surface Pourbaix diagrams, based on density functional theory (DFT) calculations, we have identified the atomic structure of a sub-surface hydride phase on the Mg (0001) surface that remains electrochemically stable under significant anodic overpotentials across a wide pH range. Specifically, this stability persists up to 0.38 VSHE under mildly alkaline conditions (e.g., pH = 8), thus providing thermodynamic support for the proposed hydride-enhanced HER under anodic conditions. Reaction barrier analysis establishes that the proposed sub-surface hydride phase could promote anodic HER via a Heyrovsky pathway, based on hydrogen outward diffusion, with an energy barrier of 1.54 eV as the rate-limiting step, showing an anodic characteristic and significantly favouring external anodic polarisation. Furthermore, we have established that the surface adsorption condition, contingent on both the pH and potential, significantly influences the mechanism and kinetics of the initial corrosion of Mg.