One-dimensional (1D) nanomaterials which are rich in multiple transition metal-nitrogen-carbon active sites have great potential as catalysts for the oxygen evolution reaction (OER) and oxygen reduction reaction (ORR). Herein, a roller-comb-like 1D nanostructure is synthesized by a template-assisted method with pyrolysis to create such bifunctional catalysts. Initially, two zeolite imidazole frameworks (ZIF-8 and ZIF-67) are simultaneously grown on polypyrrole (PPy) nanotubes, which are then calcined into 1D N doped carbon nanotubes (NCNTs) modified with Zn, Co nanoparticles and micro-CNTs. The simultaneous formation of two ZIFs on the PPy tubes reduces their particle sizes, which subsequently increases the density of metal nanoparticles on the 1D CNTs. Importantly, the co-deposition of both Zn and Co nanoparticles is a necessary condition to generate a large amount of micro-CNTs, which are embedded with metal nanoparticles at their ends, promoting the connectivity between the metal active sites. The temperature effect on the morphology, composition and properties of pyrolysis products was investigated in detail, which identified that the catalyst synthesised at 800 °C exhibited the best bifunctional ORR/OER performance with a ΔE value as low as 0.73 V. A rechargeable Zn-air battery assembled with this catalyst achieves an excellent peak power density of 194.3 mW cm−2.