Developing nonprecious electrocatalysts with bifunctional performances for oxygen reduction (ORR) and evolution reactions (OER) remains a crucial challenge in rechargeable Zn-air batteries (RZABs). In this study, we report the synthesis of a three-dimensional (3D) porous N, P-doped carbon-wrapped cobalt phosphide composite (Co2P@3DNPC) via direct calcination of a novel organic/inorganic porous coordination polymer by an in-situ phosphating strategy. DFT calculations demonstrate the intricate interactions occurring during the PEI-directed grinding self-assembly process among Co2+, phytic acid (PA), and polyethylenimine (PEI). Specifically, Co2+ ions initially adsorb onto PEI molecules before integrating with PA to form a 3D coordination polymer matrix. As-fabricated Co2P@3DNPC composite exhibits impressive ORR/OER bifunctional performances, with a half-wave potential of 0.78 V and an overpotential of 1.71 V, respectively. Its bifunctional activities enable a power density of 148.5 mW cm–2 in rechargeable ZABs, with remarkable stability (> 480 h) during a discharge-charge cycle. The interconnected porous structure and embedded Co2P nanoparticles optimize the electrode-electrolyte interfacial contact, boosting energy density and cycle life of as-assembled ZABs. This innovative approach paves the way for efficient, cost-effective production of bifunctional electrocatalysts for RZABs.