Nitrate (NO3−-N) is ubiquitously present in groundwater, constituting a growing threat to human health. In this study, iron-scrap and pyrite-based constructed wetlands (CWs) were constructed to investigate the treatment performance and removal mechanisms in purifying nitrate-contaminated groundwater. Results showed that the NO3−-N removal efficiency of iron-scrap-based CWs (87.1%) was higher than that of pyrite-based CWs (59.5%), and the higher N2O emission (28.46 μg/(m2•h)) was also obtained in CW with iron-scrap. Nevertheless, total nitrogen removal did not exhibit a significant difference between two CWs due to the accumulation of ammonium nitrogen (NH4+-N) in iron-scrap-based CWs. Additionally, sulfate was produced in CW with pyrite, as a by-product, and caused oxidative stress damage to plants. Metagenomic analysis showed that the addition of iron-scrap could increase microbial diversity and enrich autotrophs denitrifies (e.g., Ferritrophicum), which explained the higher NO3−-N removal reasonably. Additionally, the abundance of dissimilatory nitrate reduction bacterium was enhanced in iron-scrap-based CW, explaining the NH₄⁺-N accumulation. Further metabolic analysis confirmed the occurrence of Fe cycle in CW with iron-scrap, and functional genes related to NO3−-N removal and TCA cycle were up-regulated, offering a rationale for the improved NO3−-N removal in CW with iron-scrap. This study offers comprehensive insights into the NO3−-N removal and its mechanism through iron mediated CWs in controlling groundwater pollution.