The drinking water distribution system is an important link with water supply system and it affects the quality of the drinking water. Indoor pipeline water quality is regulated by physical, hydraulic and biological elements, such as indoor temperature and stagnation. In this study, full-length 16S rRNA gene sequencing and flow cytometry were used to assess the indoor heating and overnight stagnation on the variation in bacterial community structure and the Intact cell count. The results exhibited that the average intact cell count was 6.99 × 104 cells/mL and the low nucleic acid (LNA) bacteria was 4.48 × 104 cells/mL after stagnation. The average concentration of total and intracellular adenosine triphosphate (ATP) was 3.64 × 10-12 gATP/mL and 3.13 × 10-17 gATP/cell in stagnant water, respectively. The growth of LNA cells played a crucial role in increasing ATP. The dominant phylum was Proteobacteria with average abundance of 87.21%, followed by Actinobacteria (8.25%). Pseudomonas sp. and Mycobacterium sp. increased 1.2-fold and 5.8-fold in stagnant water. Structural equation model and redundancy analysis illustrated that temperature, residual chlorine and Fe concentration significantly affected bacterial count and bacterial community. Taking together, these results show responses of drinking water quality to overnight stagnation and indoor heating, and provide scientific basis for drinking water security management.