There is increasing concern about discoloration problems and microbial risks in drinking water. Until recently, how to control iron release and pathogenic bacterial growth in distribution pipes has been a knowledge gap. In our study, nanofiltration removed 13.3 % of lignins, 33.1 % of tannins and 17.7 % of proteins from dissolved organic matter (DOM). These DOM components were closely related to enzymes involved in the tricarboxylic acid (TCA) cycle. Therefore, nanofiltration followed by chlorine or chloramine disinfection inhibited the TCA cycle and induced lower adenosine triphosphate (ATP) and extracellular polymeric substance (EPS) production, resulting in reduced pathogenic bacterial growth. The number of Pseudomonas aeruginosa decreased to 7.43 × 105 and 2.43 × 105 gene copies/mL, respectively. Moreover, lower DOM concentrations increased the abundance of iron-reducing bacteria (IRBs) in the biofilm. IRBs can convert Fe(III) into Fe(II) through cellular c-type cytochromes, including CymA, MtrA, Cytc3, MacA, PpcA, and OcmB. The higher abundance of IRB and their cytochromes led to more Fe3O4 formation on the surface of the distribution pipes, resulting in lower iron release. The total iron concentration was 16.9 μg/L in the effluent of pipes treated with nanofiltration and chloramine disinfection. Therefore, nanofiltration followed by different disinfection methods, especially chloramine disinfection, effectively controlled iron release and pathogenic bacterial growth in distribution pipes. This study strongly contributes to maintaining the drinking water quality in distribution pipes.