The synergies of nanoconfinement and catalysis is an effective strategy to improve the kinetic and thermodynamic properties of Mg-based materials. However, obtaining Mg-based materials with high loading, anti-aggregation, and containing nanocatalysts to achieve dehydrogenation at room temperature remains a huge challenge. Herein, a novel and universal preparation strategy for Mg-Co@C nanocomposites with 9.5nm Mg nanoparticles and 9.4nm Co nanocatalysts embedded in carbon scaffold is reported. The 9.3nm MgBu2 nanosheets precipitated by solvent displacement are encapsulated in ZIF-67 to prepare MgBu2@ZIF-67 precursors, then removing excess MgBu2 on the precursor surface and pyrolysis to obtain Mg-Co@C. It is worth noting that the Mg loading rate of Mg-Co@C is as high as rare 69.7%. Excitingly, the Mg-Co@C begins to dehydrogenate at room temperature with saturate capacity of 5.1wt.%. Meanwhile, its dehydrogenation activation energy (Ea(des) = 68.8kJ mol-1) and enthalpy (ΔH(des) = 61.6kJ mol-1) significantly decrease compared to bulk Mg. First principles calculations indicate that the hydrogen adsorption energy on the Mg2CoH5 surface is only -0.681eV. This work provides a universally applicable novel method for the preparation of nanoscale Mg-based materials with various nanocatalysts added, and provides new ideas for Mg-based materials to achieve room temperature hydrogen storage.