3,4-dihydroxy-2-butanone-4-phosphate synthase (DHBPS) catalyzes the conversion of D-ribulose 5-phosphate (Ru5P) to L-3,4-dihydroxy-2-butanone-4-phosphate in the presence of Mg2+. Although crystal structures of DHBPS in complex with Ru5P and non-catalytic metal ions have been reported, structure with Ru5P along with Mg2+ is still elusive. Therefore, mechanistic role played by Mg2+ in the structure of DHBPS is poorly understood. In this study, molecular dynamics simulations of DHBPS-Ru5P complex along with Mg2+ have shown entry of Mg2+ from bulk solvent into active site. Presence of Mg2+ in active site has constrained conformations of Ru5P and has reduced flexibility of loop-2. Formation of hydrogen bonds among Thr-108 and residues - Gly-109, Val-110, Ser-111, and Asp-114 are found to be critical for entry of Mg2+ into active site. Subsequent in silico mutations of residues, Thr-108 and Asp-114 have substantiated the importance of these interactions. Loop-4 of one monomer is being proposed to act as a “lid” covering the active site of other monomer. Further, the conserved nature of residues taking part in the transfer of Mg2+ suggests the same mechanism being present in DHBPS of other microorganisms. Thus, this study provides insights into the functioning of DHBPS that can be used for the designing of inhibitors.