Microcavities play a crucial role as microreactors in the transport of molecular/ionic guests and the exposure of active sites, thus significantly influencing the electrocatalytic performance. This study prepares Co/N-codoped hollow carbon (HT-CoN/C) with surface-distributed carbon nanotubes by pyrolysis of PDA-coated Zn/Co bimetallic ZIF (BM-ZIF@PDA). Benefiting from the hierarchical porous structure, high specific surface area (307.17 m2 g−1) and abundant Co clusters, the HT-CoN/C exhibits remarkable bifunctional oxygen electrocatalytic activity with an overpotential of the ORR/OER processes (ΔE = 0.703 V). The density functional theory (DFT) calculations also verify that the configuration of C-coated N-coordinated Co clusters (Co4-Nx) affect the electrocatalytic activity of ORR and OER, illustrating the source of the excellent oxygen electrocatalytic activity of HT-CoN/C. The aqueous rechargeable zinc-air battery (RZAB) using HT-CoN/C as the air electrode is characterized by a superior peak power density (175 mW cm−2), a prolonged cycle life (1230 cycles/410 h at 5.0 mA cm−2) and a high open-circuit voltage (1.47 V). Meanwhile, the flexible solid-state RZAB assembled by the HT-CoN/C also exhibits a higher peak power density (117 mW cm−2) and an excellent bending performance. This work is extremely valuable for the design and synthesis of Co/N co-doped carbon electrocatalysts.