Water electrolysis has attracted scientists' attention as a green route for energy generation. However, the sluggish kinetics of oxygen evolution reaction (OER) remarkably increases the reaction overpotential. In this work, we developed Co-based nanomaterials as cost-effective, highly efficient catalysts for OER. In this regard, different Co-based metal−organic frameworks (MOFs) were synthesized using different organic linkers. After annealing under inert atmosphere, the corresponding Co-embedded mesoporous carbon (Co/MC) materials were produced. Among them, Co/MC synthesized using 2-methyl imidazole (Co/NMC-2MeIM) expressed the highest surface area (412 m 2 /g) compared to its counterparts. Furthermore, it expressed a higher degree of defects as depicted by Raman spectra. Co/NMC-2MeIM exhibited the best catalytic performance toward OER in alkaline medium. It afforded an overpotential of 292 mV at a current density of 10 mA cm −2 and a Tafel slope of 99.2 mV dec −1 . The superior electrocatalytic performance of Co/NMC-2MeIM is attributed to its high content of Co 3+ on the surface, high surface area, and enhanced electrical conductivity induced by nitrogen doping. Furthermore, its high content of pyridinic-N and high degree of defects remarkably enhance the charge transfer between the adsorbed oxygen species and the active sites. These results may pave the avenue toward further investigation of metal/carbon materials in a wide range of electrocatalytic applications.