There are several chemical and electrochemical reactions that occur on a solvated magnesium surface, many of which contribute to the localized corrosion of magnesium and its alloys. The hydrogen evolution reaction (HER) is of particular interest because corrosion rates for different Mg alloys can be estimated by in situ monitoring of HER from a corroding sample surface. Therefore, a detailed mechanism for the HER on magnesium is proposed that connects the initial water dissociation reaction with the Tafel reaction through a self-consistent pathway involving adsorbed species. First principles modeling using Density Functional Theory (DFT) is used to map this reaction pathway on Mg(0001) and to determine the thermodynamic variables and kinetic barriers for each reaction in the scheme. An alternative mechanism for HER is also modeled that involves subsurface hydrogen, but this mechanism is found to have a negligible Gibbs free energy. It is also found that water dissociation occurs over the Mg-Mg bridging site and has a large thermodynamic driving force. Reactions involving multiple water molecules and adsorbed species are modeled, as well, and it is found that the presence of H ads and OH ads