The active sites of inexpensive transition metal electrocatalysts are sparse and singular, thus high-entropy alloys composed of non-precious metals have attracted considerable attention due to their multi-component synergistic effects. However, the facile synthesis of high-entropy alloy composites remains a challenge. Herein, we report a "one-stone, two-birds" method utilizing zinc (Zn)-rich metal-organic frameworks as precursors, by virtue of the low boiling point of Zn (907 °C) and its high volatility in alloys, high-entropy alloy carbon nanocomposite with a layered pore structure was ultimately synthesized. The experimental results demonstrate that the volatilization of zinc can prevent metal agglomeration and contribute to the formation of uniformly dispersed high-entropy alloy nanoparticles at slower pyrolysis and cooling rates. Simultaneously, the volatilization of Zn plays a crucial role in creating the hierarchical porous structure. Compared to the zinc-free HEA/NC-1, the HEA/NC-5 derived from the precursor containing 0.8 Zn exhibit massive micropores and mesopores. The resulting nanocomposites represent a synergistic effect between highly dispersed metal catalytic centers and hierarchical adsorption sites, thus achieving excellent electrocatalytic oxygen reduction performance with low catalyst loading compared to commercial Pt/C. This convenient zinc-rich precursor method can be extended to the production of more high-entropy alloys and various application fields.