[Objective] To explore the diversity of nitrogen-fixing microbial community and its response to geochemical parameters in the water of the mainstream and branches in the Three Gorges Reservoir (TGR) [Methods] A total of 18 water samples were collected from the mainstream and branches of the TGR before and after drainage (in March and June). The physical and chemical parameters of the samples were measured, and nifH gene diversity was analyized by using clone library-based phylogenetic analysis. The geochemical parameters of water bodies were correlated with the diversity and community composition of nitrogen-fixing microbial. [Results] The geochemical parameters differed significantly before (in March) and after (in June) drainage. The nitrogen-fixing microbes were dominated by Proteobacteria (50.3%) and Firmicutes (40.0%) the TGR waters in March (before drainage), in contrast with the dominance of Proteobacteria (48.4%), Firmicutes (25.4%) and Cyanobacteria (19.0%) in June (after drainage). Significant temporal and spatial variations were observed among the nitrogen-fixing microbial community composition and diversity as indicated by statistical analysis (Cluster and CCA analyses). The diversity of nitrogen-fixing microbes in the TGR waters after drainage (in June) was higher than before. The diversity of nitrogen-fixing microbes was higher in waters from tributaries than that from the main stream. Mantel test showed that the composition of nitrogen-fixing microbes was significantly correlated with the geochemical parameters of water. Water temperature was the most important factor affecting the community and variety of nitrogen-fixing microbes in the TGR waters.[Conclusion] The nitrogen-fixing microbial community compositions in the TGR waters show significant temporal and spatial variations, which could be ascribed to the different geochemical parameters, especially water temperature.