• A weak-strong coetching strategy is developed for metal–organic frameworks. • Hollow nanopompoms structure is obtained and can be maintained upon pyrolysis. • Pyrolyzed nanopompoms allow for efficient electron transfer applications. • Heterophases increase active sites and promotes electrocatalytic performance. • Nanopompoms catalyst has desirable bifunctional performance for Zn-air batteries. The rational structure and composition design of bifunctional electrocatalysts for oxygen evolution reactions (OER) and oxygen reduction reactions (ORR) is crucial for rechargeable metal–air batteries. Here, we report controlled structural transitions of metal–organic frameworks through a weak-strong competitive coordination strategy for high-performance electrocatalysts. Upon the introduction of potassium ferricyanide (PF) and/or phosphomolybdic acid (POM), cubic zeolitic-imidazole framework-67 (Cube-67) undergoes both chemical and macroscopic morphology changes, i.e., from nanocubes to hollow nanopompoms, where PF and POM act as the weak chelator (i.e., for finer structures) and the strong chelator (i.e., shape-directing agent), respectively. After calcination, the hierarchically structured nanopompoms display tunable and high-performance OER and ORR catalytic activities suitable for Zn–air batteries that display a long-term charge–discharge cycling stability. This work not only holds promise for clean-energy applications but provides a design principle for engineering advanced electrocatalysts by effectively tuning their structural and chemical properties.