The development of low-cost, highly active, and stable oxygen reduction reaction (ORR) catalysts is of great importance for practical applications in numerous energy conversion devices. Herein, iron/nitrogen/phosphorus co-doped carbon electrocatalysts (NPFe-C) with multistage porous structure were synthesized by the self-template method using melamine, phytic acid and ferric trichloride as precursors. In an alkaline system, the ORR half-wave potential is 0.867 V (vs. RHE), comparable to that of platinum-based catalysts. It is noteworthy that NPFe-C performs better than the commercial Pt/C catalyst in terms of power density and specific capacity. Its unique structure and the feature of heteroatom doping endow the catalyst with higher mass transfer ability and abundant available active sites, and the improved performance can be attributed to the following aspects: (1) Fe-, N-, and P triple doping created abundant active sites, contributing to the higher intrinsic activity of catalysts. (2) Phytic acid was crosslinked with melamine to form hydrogel, and its carbonized products have high specific surface area, which is beneficial for a large number of active sites to be exposed at the reaction interface. (3) The porous three-dimensional carbon network facilitates the transfer of reactants/intermediates/products and electric charge. Therefore, Fe/N/P Co-doped 3D porous carbon materials prepared by a facile and scalable pyrolysis route exhibit potential in the field of energy conversion/storage.