The hammerhead ribozyme is a well-studied nucleolytic ribozyme that catalyzes the self-cleavage of the RNA phosphodiester backbone. Despite experimental and theoretical efforts, there remain key questions about details of the mechanism with regard to the activation of the nucleophile by the putative general base guanine (G12). Straight-forward interpretation of the measured activity-pH data implies the pKa value of the G12 nucleobase is significantly shifted by the ribozyme environment. Recent crystallographic and biochemical work has identified pH-dependent divalent metal ion binding at the N7/O6 position of G12, leading to the hypothesis that this binding mode could induce a pKa shift of G12 towards neutrality. We present computational results that unify the interpretation of available structural and biochemical data, and paint a detailed mechanistic picture of the general base step of the reaction. Electronic structure calculations quantify the magnitude of predicted pKa shifts induced by Mg2+ binding in several Mg2+-guanine complexes. Molecular dynamics and free energy simulations using newly developed 12-6-4 parameters for divalent metal ion binding to nucleic acids are used to characterize the ribozyme active site environment and evaluate the pKa of G12 in HHR with and without the Mg2+ ion bound. The results suggest that Mg2+ is able to down-shift the pKa of G12 by −1.2 units in accord with the apparent pKa value determined from activity-pH measurements. In addition, ab initio quantum mechanical/molecular mechanical simulations are performed to explore the free energy profile for the general base step in the presence and absence of Mg2+. Taken together, these results are in quantitative agreement with available experimental data, and support a cooperative mechanism whereby Mg2+ binding at the N7/O6 position serves to stabilize G12 in the functional, deprotonated form that can abstract a proton from the nucleophile in the general base step of the reaction. In this scenario, site-specific Mg2+ ion binding acts as a switch to activate the general base in HHR. Finally, experimentally-testable predictions are made on the mutational and rescue effects on G12, which will give further insights into the catalytic mechanism. These results contribute to our growing knowledge of the potential roles of divalent metal ions in RNA catalysis.