This study aimed at optimizing the production of hyaluronic acid by Lactobacillus acidophilus FTDC 1231 using response surface methodology and evaluating the effects of divalent metal ions along the production pathway using molecular docking. Among different divalent metal ions that were screened, only iron (II) sulphate and copper (II) sulphate significantly (P < 0.05) affected the production of hyaluronic acid. Subsequent optimization yielded hyaluronic acid at concentration of 0.6152 mg/mL in the presence of 1.24 mol L(-1) iron (II) sulphate and 0.16 mol L(-1) of copper (II) sulphate (103 % increase compared to absence of divalent metal ions). Data from molecular docking showed Fe(2+) improved the binding affinity of UDP-pyrophophorylase towards glucose-1-phosphate, while Cu(2+) contributed towards the interaction between UDP-glucose dehydrogenase and UDP-glucose. We have demonstrated that lactobacilli could produce hyaluronic acid at increased concentration upon facilitation by specific divalent metal ions, via specific targets of enzymes and substrates along pentose phosphate pathway.