An efficient approach for fabrication of non-noble metal-based electrocatalyst is desirable for designing the energy storage and conversion devices in real-world usages due to low cost and excellent catalytic properties. The preparation of hollow carbon capsules (HCC) containing cobalt (Co)-based electrocatalyst is reported by a simple synthesis process without using templates for the first time. Initially, cobalt phenylphosphonate (Co-MOF) nanorods are fabricated through a simple hydrothermal approach. The as-formed Co-MOF is covered with a thin coating of polydopamine (DP-Co-MOF) through chemical polymerization of dopamine in Tris-HCl (pH 8.5). The DP-Co-MOF is used as self-degraded template for the formation of HCC under pyrolysis. The formation mechanism and hydrogen evolution reaction (HER) activity of HCC are investigated. The hollow structure derived under N<sub>2</sub> exhibits a low overpotential (295 mV at 100 mA cm<sup>-2</sup>) with excellent stability (90.98%) for 150 h, which is further verified by density functional theory (DFT) calculations. Finally, the designed anion exchange membrane (AEM) water electrolyzer based on C─Co─N as cathode delivers a current density of 500 mA cm<sup>-2</sup> (at 2.19 V) and 1000 mAcm<sup>-2</sup> (at 2.33 V) in 1.0 m KOH at 60 °C. The fabricated new Co-based electrocatalyst is highly beneficial for the fabrication of cost-effective and high-performance AEMWEs.