Coal tar pitch, the residue generated from distillation of coal tar, is cheap, abundant, and carbon enriched. This paper evaluates the effects of the surface modification of coal-tar pitch-derived nanoporous carbons (NPCs) as anode materials on the performance of Escherichia coli (E. coli)-based microbial fuel cells (MFCs) for the first time. The coal-tar pitch precursors are heated under N2 to 450 °C (450O) and 750 °C (750X) to obtain NPCs with different concentrations of oxygen-containing functional groups. 750X is, thereafter, doped with nitrogen atoms to generate a nitrogen-doped NPCs (750N). More biofilm is formed on the 750N anode than the 750X or 450O anode because of the higher electrical conductivity and biocompatibility of 750N. As a result, a higher power output of MFC is obtained when the 750N anode is used. The maximum power density of 750N is 3772 mW m−2, while that of 750X and 450O are 2876 mW m−2 and 3562 mW m−2, respectively, demonstrating that 750N is a potential sustainable anode material for high-performance MFC applications.