Abstract Magnesium-ion batteries have the potential to replace the current commercial Li-ion batteries due to their eco-friendliness and cost-effectiveness. However, because of the strong polarization of Mg ions, conventional electrode materials find it difficult to capture Mg ions. In order to find an excellent anode material for Mg-ion batteries, we used density functional theory to evaluate the applicability of T-type and H-type Mo 2 B monolayers as electrode materials for Mg-ion batteries. The simulation results show that the adsorption energies of T-type and H-type Mo 2 B monolayers for Mg atoms are −1.08 eV and −0.78 eV (−2.16 eV and −2.14 eV with the solvent effect), respectively, which are sufficient to ensure the stability of the procession of magnetization. In addition, the ultra-low diffusion barriers (0.057 eV/0.110 eV) of Mg atoms on their surfaces show a good charge and discharge rate. The theoretical specific capacity (529 mA h g −1 ) and the theoretical voltages (0.65 V/0.40 V) indicate that T-type and H-type Mo 2 B monolayers are promising anode materials for Mg-ion batteries.