Finding renewable energy sources to replace fossil energy has been an essential demand in recent years. Hydrogen gas has been becoming a research hotspot for its clean and free-carbon energy. However, hydrogen storage technology is challenging for mobile and automotive applications. Metal-organic frameworks (MOFs) have emerged as one of the most advanced materials for hydrogen storage due to their exceptionally high surface area, ultra-large and tuneable pore size. Recently, computer simulations allowed the designing of new MOF structures with significant hydrogen storage capacity. However, no studies are available to elucidate the hydrogen storage in M(BDC)(TED)0.5, where M = metal, BDC = 1,4-benzene dicarboxylate, and TED = triethylenediamine. In this report, we used van der Waals-dispersion corrected density functional theory and grand canonical Monte Carlo methods to explore the electronic structure properties, adsorption energies, and gravimetric and volumetric hydrogen loadings in M(BDC)(TED)0.5 (M = Mg, V, Co, Ni, and Cu). Our results showed that the most favourable adsorption site of H2 in M(BDC)(TED)0.5 is the metal cluster-TED intersection region, in which Ni offers the strongest binding strength with the adsorption energy of -16.9 kJ mol-1. Besides, the H2@M(BDC)(TED)0.5 interaction is physisorption, which mainly stems from the contribution of the d orbitals of the metal atoms for M = Ni, V, Cu, and Co and the p orbitals of the O, C, N atoms for M = Mg interacting with the σ* state of the adsorbed hydrogen molecule. Noticeably, the alkaline-earth metal Mg strongly enhanced the specific surface area and pore size of the M(BDC)(TED)0.5 MOF, leading to an enormous increase in hydrogen storage with the highest absolute (excess) gravimetric and volumetric uptakes of 1.05 (0.36) wt% and 7.47 (2.59) g L-1 at 298 K and 7.42 (5.80) wt% and 52.77 (41.26) g L-1 at 77 K, respectively. The results are comparable to the other MOFs found in the literature.