We report a Density Functional Theory (DFT) study on the electrochemical deposition process of Mg. We studied the impact of the thermodynamics and the kinetics to the morphologies of the deposited phases. Our analysis showed that the free energy difference between high dimensional and low dimensional phases was higher for Mg than for Li as a result of the stronger MgMg bond strength. On the other hand, the migration barriers of Li and Mg showed close values. These findings indicated that the electrochemically deposited Mg essentially prefers to form crystalline layers in comparison with Li due to the intrinsic thermodynamic properties. It suggested that Mg anode provides not only high energy densities, but also the potential to avoid the issues caused by the growth of dendrites.