The nanoporous carbon fiber materials derived from electrospun polyacrylonitrile (PAN) fibers doped with zeolitic imidazolate framework are developed here and applied in the microbe fuel cell anode for enhanced interfacial electron transfer. Zeolitic imidazolate fram-8 (ZIF-8) could introduce a large number of mesopores into fibers, which significantly promote indirect electron transfer mediated by flavins (IET). Moreover, it is noted that thinner fibers are more suitable for cytochromes-based direct electron transfer (DET). Furthermore, the enlarged fiber interspace strengthens the amount of biofilm loading but a larger interspace between thick fibers would hinder the formation of continuous biofilm. Consequently, the nanoporous carbon fiber derived from PAN/ZIF-8 composite with a 1:1 wt ratio shows the best performance according to its suitable mesoporous structure and optimal fiber diameter, which delivers a 10-fold higher maximum power density in microbial fuel cells compared to carbon fabric. In this work, we reveal that the proportion of IET and DET in the interfacial electron transfer process varies with different porous structures and fiber diameters, which may provide some insights for designing porous fiber electrodes for microbial fuel cells and also other devices of bioelectrochemical systems.