A simple and green approach is studied for the preparation of a high-activity metal-free N,Ocodoped porous carbon (NOPC) electrocatalyst by one-step pyrolysis of pristine zinc-based zeolite-like metal-organic framework (Zn-ZMOF) synthesized by hydrothermal method from Zn 2+ and 4,5-imidazoledicarboxylic acid (H 3 IDC) in H 2 O solvent. It is found that the structure and electroactivity of Zn-ZMOF and NOPC vary with the molar ratio of H 3 IDC to zinc acetate. NOPC shows pH-universal electrocatalytic property for oxygen reduction reaction and its electrocatalytic performance is similar to that of Pt/C in alkaline and neutral electrolytes, and is close to that of Pt/C in acidic electrolyte, which is a relatively rare case for metal-free porous carbon derived from pristine MOF. Meanwhile, NOPC displays higher long-term stability and better tolerance to methanol and carbon monoxide poisoning than that of commercial Pt/C. The excellent performance of NOPC is mainly due to the special structure of the precursor Zn-ZMOF, and the synergism of abundant active sites, micro/mesoporous structure, large specific surface area, and high degree of graphitization.