In this work, doped nanocarbon electrocatalysts for electrochemical oxygen reduction reaction (ORR) are prepared by high-temperature pyrolysis from Honeyol, cobalt and iron salts, and dicyandiamide. MgO-based inorganic templates are further used to increase the mesoporosity of the prepared catalyst materials. The templated bimetallic electrocatalyst containing iron and cobalt (FeCoNC-MgOAc) showed excellent stability and remarkable ORR performance in rotating disk electrode testing in alkaline conditions. The catalyst was further tested in anion-exchange membrane fuel cells (AEMFCs), where FeCoNC-MgOAc performed significantly better than the nontemplated material (FeCoNC), yielding a peak power density (Pmax) of 0.92 W cm–2 surpassing that of the commercial Pt/C (20 and 40 wt %) catalysts (Pmax = 0.85 and 0.69 W cm–2, respectively). The high AEMFC performance was attributed to the mesoporous morphology and high density of active sites in the nanocarbon-based cathode catalyst.