It is well documented that after the water has been treated in the treatment plant, the quality of drinking water is degraded during transport to consumers inside the drinking water distribution system (DWDS). One of the critical reasons for altering drinking water quality is the biofilm detached from the pipe wall to the bulk water. In this paper, the effects of hydraulic conditions such as flow velocity and flow direction, on the biofilm were investigated. The results show that, compared with other flow conditions, the biofilm is the thickest (267.4 μm) and the adhesion force is the lowest under the fluctuant flow velocity. The fluctuant flow velocity increased the relative abundance of Sphingobium and Blastomonas, decreased the relative abundance of Dechloromonas and Sediminibacterium. The Sphingobium with strong environmental adaptability and metabolic capacity could accelerate the growth of biofilm under fluctuant flow velocity conditions. The abundance of functional genes that could reflect microbial metabolic capacity in the biofilm under fluctuant flow velocity conditions is significantly higher than that under other hydraulic conditions. The total number of bacteria in the biofilm under reverse flow conditions was 31.48 %–32.01 % and 47.97 %–71.38 % lower than that under low and high flow conditions, respectively, indicating that the shear force generated by the reverse flow had resulted in biofilm detachment. This study improved our understanding of the influence of different hydraulic conditions on biofilms in the DWDS and helped us understand how to operate the DWDS without causing additional biofilm detachment.