The development of effective and affordable adsorption materials for CO2 capture is a crucial issue. Biochar can play a significant role in CO2 capture, alongside other available adsorbents. In this research, biochar was made from the agricultural waste corn cobs through a pyrolysis process. Biochar itself has a limited capacity for capturing CO2. It needs to be modified to increase its CO2-capturing efficiency. This research aims to improve the CO2-capturing efficiency of corn cob-based biochar by incorporating magnesium and sodium metals into its structure with heat treatment under N2. The physicochemical properties of biochar were characterized by pore volume (25%), specific surface area (346.2 m2/g), average particle size (0.52 nm), and point zero charge (pH = 5.12). The XRD results showed that incorporating metals into biochar improved crystal structure formation and boosted the degree of carbon structure ordering. SEM analysis revealed that the biochar surface impregnated with metal oxide had a distribution of spotted activation centers. The adsorption of CO2 onto biochar was in the order of Mg metal-incorporated biochar > Na metal-incorporated biochar > pristine biochar at 25 °C and 1 atm. The elemental analysis employed by EDX indicates that the Mg-incorporated biochar has a higher CO2 uptake capacity. The XPS spectrum and13C NMR also agreed with the EDX results. The CO2 adsorption efficiency of Mg-incorporated biochar reached an impressive 94.6%, the highest reported in the literature to date. This efficiency was also higher than that of Na-loaded biochar (81.20%) and pristine biochar (64.43%). We can conclude that corn-cob-based biochar, which is made from agricultural waste, is both economically viable and effective in CO2-capturing systems.