Four subsurface flow constructed wetlands (SFCWs) filled with different substrates including ceramsite, ceramsite+pyrite, ceramsite+ferrous sulfide, and ceramsite+pyrite+ferrous sulfide (labeled as SFCW-S1, SFCW-S2, SFCW-S3, and SFCW-S4) were constructed, and the removal of nitrogen and phosphorus by these SFCWs coupled with intermittent aeration in the front section was discussed. The key findings from different substrate analyses, including nitrification and denitrification rate, enzyme activity, microbial community structure, and the X-ray diffraction, revealed the nitrogen and phosphorus removal mechanism. The results showed that the nitrogen and phosphorus removal efficiency for SFCW-S1 always remains the lowest, and the phosphorus removal efficiency for SFCW-S4 is recorded as the highest one. However, after controlling the dissolved oxygen by intermittent aeration in the front section of SFCWs, the nitrogen and phosphorus removal efficiencies of SFCWs-S2 and S4 becomes higher than those of SFCW-S1, and SFCW-S3. It was noticed that the pollutants were removed mainly in the front section of the SFCWs. Both precipitation and adsorption on the substrate were the main mechanisms for phosphorus removal. A minute difference of nitrification rate and ammonia monooxygenase activity was observed in the SFCWs aeration zone. The denitrification rates, nitrate reductase, nitrite reductase, and electron transport system activity for SFCW-S2 and SFCW-S4 were higher than those detected for SFCW-S1 and SFCW-S3 in the non-aerated zone. Proteobacteria was the largest phyla found in the SFCWs. Moreover, Thiobacillus occupied a large proportion found in SFCW-S2, and SFCW-S4, and it played a crucial role in pyrite-driven autotrophic denitrification.