Efficient and stable electrocatalysts are required for microbial fuel cells (MFCs). They must be accessible to realize industrialization. Herein, a hierarchically porous phosphorus and ironembedded nitrogen-containing carbon (P/Fe-SS) was synthesized with shrimp shells as a carbon matrix via a facile oxidation pretreatment and pyrolysis process, where FeCl 3 and H 3 PO 4 were used as the catalyst and activator, respectively. Meanwhile, both of them acted as the doping sources to induce more active sites. The optimal pyrolysis temperature (900 °C) introduced a large specific surface area (857 m 2 /g) and hierarchical pores, facilitating the exposure of active sites. Furthermore, the presence of pyridinic-N and Fe/P active sites endowed P/Fe-SS 900 with excellent activity during the oxygen reduction reaction process. In particular, P/Fe-SS 900 showed higher long-term stability and poisoning resistance than those of Pt/C. When P/ Fe-SS 900 was applied as an air cathode in a MFC, its maximum power density reached 96.7 % of that of Pt/C. These results provide a promising alternative to Pt/C for MFC application due to their low cost, accessibility, and high stability.