BackgroundCurrently, the effect of the bacterial community on cast iron corrosion process does not reach consensus. Moreover, some studies have produced contrasting results, suggesting that bacteria can either accelerate or inhibit corrosion.ResultsThe long-term effects of the bacterial community on cast iron corrosion in reclaimed wastewater distribution systems were investigated from both spatial (yellow layer vs. black layer) and temporal (1-year dynamic process) dimensions of the iron coupon-reclaimed wastewater microcosm using high-throughput sequencing and flow cytometry approaches. Cast iron coupons in the NONdisinfection and UVdisinfection reactors suffered more severe corrosion than did those in the NaClOdisinfection reactor. The bacterial community significantly promoted cast iron corrosion, which was quantified for the first time in the practical reclaimed wastewater and found to account for at least 30.5% ± 9.7% of the total weight loss. The partition of yellow and black layers of cast iron corrosion provided more accurate information on morphology and crystal structures for corrosion scales. The black layer was dense, and the particles looked fusiform, while the yellow layer was loose, and the particles were ellipse or spherical. Goethite was the predominant crystalline phase in black layers, while corrosion products mainly existed as an amorphous phase in yellow layers. The bacterial community compositions of black layers were distinctly separated from yellow layers regardless of disinfection methods. The NONdisinfection and UVdisinfection reactors had a more similar microbial composition and variation tendency for the same layer type than did the NaClOdisinfection reactor. Biofilm development can be divided into the initial start-up stage, mid-term development stage, and terminal stable stage. In total, 12 potential functional genera were selected to establish a cycle model for Fe, N, and S metabolism. Desulfovibrio was considered to accelerate the transfer of Fe0 to Fe2+ and speed up weight loss.ConclusionThe long-term effect of disinfection processes on corrosion behaviors of cast iron in reclaimed wastewater distribution systems and the hidden mechanisms were deciphered for the first time. This study established a cycle model for Fe, N, and S metabolism that involved 12 functional genera and discovered the significant contribution of Desulfovibrio in promoting corrosion.Electronic supplementary materialThe online version of this article (10.1186/s40168-018-0610-5) contains supplementary material, which is available to authorized users.