Enhancing the treatment capacity of complex wastewater has a contributing role to the green development of the environment. In this paper, the wastewater treatment capacity of microbial fuel cells is enhanced based on the excellent properties of nanocarbon materials. Nitrogen-doped porous carbon materials and biomass carbon materials are prepared as the material basis for the modified anode of the cell. The microbial fuel cells were constructed and the effluent treatment capabilities of the three types of cells, L-N/PCs-MFC, N/PCs-MFC, and PCsMFC, were compared by multiple sets of experiments. The electrochemical performance of L-N/PCs-MFC was analyzed based on cyclic voltammetry, polarization and power density tests. The water purification effect of LN/PCs-MFC was verified by COD, TP, and TN removal tests. The results showed that the CV curves of L-N/PCs anode showed obvious redox peaks at both -0.45 V and 0.5 V voltage, which was higher than the capacitance. The open-circuit voltage was 820.59 mV and the slope was smaller than that of the comparison cell, and the internal resistance was minimized during the operation. The removal rates of COD, TP, and TN were all higher, and the water purification effect was good and could maintain the microbial activity effectively.