Microbial fuel cell-constructed wetland (MFC-CW) is considered an environment-friendly and sustainable technology to simultaneously purify water and generate bioelectricity. In this study, two MFC-CWs, including a coke/pyrite-based system (Mix-MFC-CW) and a pyrite-based system (Py-MFC-CW), were constructed to explore the role of coke and pyrite as mixed anode materials in enhancing system performance. Results showed that the incorporation of coke increased the microporous structure and specific surface area of the anode region, significantly enhancing the removal efficiency of ammonium nitrogen (89.84%±1.63%) and total inorganic nitrogen (87.82%±1.58%), as well as electricity generation. The maximum output voltage and power density reached 666 mV and 1.18 mW·m
-3, respectively. High-throughput sequencing results showed that Py-MFC-CW exhibited advantage in phosphorus removal, which may be related to the higher abundance of norank_o__Run-SP154. In contrast, the abundances of denitrifying bacteria such as
Thiothrix,
Candidatus_Competibacter, and
Thauera were higher in Mix-MFC-CW than in Py-MFC-CW. Therefore, Mix-MFC-CW would be a competitive technology facilitating both nitrogen removal and electricity generation.