Fe–N–C graphitic spheres prepared via in situ polymerization and functionalization possess both chemical functions (Fe–Nx-coordinated moieties) and hollow mesoporous structures, demonstrating exceptional activity and stability for the 4e− oxygen reduction reaction in both acidic and alkaline media.