The electrocatalytic reduction of CO2 is considered an effective method to reduce CO2 emissions and achieve electrical/chemical energy conversion. It is crucial to determine the reaction mechanism so that the key reaction intermediates can be targeted and the overpotential lowered. The process involves the interaction with the electrode surface and with species, including the solvent, at the electrode-electrolyte interface, and it is therefore not easy to separate catalytic contributions of the electrode from those of the electrolyte. We have used density functional theory-based molecular dynamics to calculate the Gibbs free energy of the proton and electron transfer reactions corresponding to each step in the electroreduction of CO2 to HCOOH in aqueous media. The results show thermodynamic pathways consistent with the mechanism proposed by Hori. Since electrodes are not included in this work, differences between the calculated results and the experimental observations can help determine the catalytic contribution of the electrode surface.