River pollution is one of the most challenging environmental issues, but the effect of river pollution levels on the biofilm communities has not been well-studied. Spatial and temporal distribution characteristics of environmental parameters and the biofilm communities were investigated in the Qinhuai River basin, Nanjing, China. Water samples were grouped into three clusters reflecting their varying pollution levels of relatively slight pollution, moderated pollution, and high pollution by hierarchical cluster analysis. In different clusters, the biofilm communities mainly differed in the proportion of Actinobacteria, Firmicutes, and Proteobacteria. As the dominant classes of Proteobacteria, Alpha-, Beta-and Gammaproteobacteria seemed to show an upward trend followed by a small fluctuation in the abundance with the escalation of water pollution level. Results of redundancy analysis demonstrated that temperature, total nitrogen to total phosphorus ratios (TN/TP) and concentrations of ammonia nitrogen (NH3-N) and TN were mainly responsible for the variation in bacterial community structure. The occurrences of Alpha-, Beta- and Gammaproteobacteria were closely associated with higher temperature, higher concentrations of NH3-N and TN and a lower TN/TP ratio. This study may provide a theoretical basis for the water pollution control and ecological restoration in urban rivers under different pollution levels.