N-doped mesoporous carbon/graphene framework (N-MCF/MGF) with ordered pores was prepared. The N-MCF/MGF outperforms Pt/C in ORR and RuO2/C in OER showing high activity and good durability. The negligible mass transfer resistance of the N-MCF/MGF in ORR benefits from their highly ordered structure. The highly ordered N-MCF/MGF can be potentially implemented in fuel cells, electrolyzers and metal-air batteries.