Abstract:[Background] Microorganisms play an indicative role in the environment, and the composition of microbial community is one of the research hotspots in water environment. [Objective] To explore the bacterial community structure and spatial distribution in the sediment of the Third Drainage Ditch in Ningxia. [Methods] The physicochemical properties of the sediment samples were analyzed, and the 16S rRNA gene amplifiers of bacteria in surface sediments from 11 sampling sites in gullies and main tributaries were sequenced by high-throughput sequencing technology. [Results] The sediment of the Third Drainage Ditch had weak alkalinity and spatial differences in physicochemical properties including organic carbon, total nitrogen, total phosphorus, ammonium nitrogen and nitrate nitrogen. The concentrations of organic carbon, total nitrogen, and total phosphorus in the sediment of Pingluo section were lower than those in Helan and Huinong sections. The richness and diversity of bacteria in the sediment of Huinong section (in the lower reaches) were significantly higher than those in Helan section (in the upper reaches). The dominant phyla were Proteobacteria (24.41%–44.40%), Chloroflexi (5.46%–17.55%), Actinobacteria (9.12%–21.21%), Bacteroidetes (6.96%–13.10%), Thermodesulfobacteria (3.40%–12.20%), Firmicutes (3.31%–14.61%), and Acidobacteria (2.00%–9.77%). The dominant genera were Thiobacillus (6.73%) and norank_f__Steroidobacteraceae (4.28%). The bacterial community composition in the sediment of Shi’er tributary was much different from that of the Third Drainage Ditch, while the composition was similar among the sampling sites in Huinong section. The redundancy analysis of bacterial community and environmental factors showed that total nitrogen, ammonium nitrogen and nitrate nitrogen had great influence on bacterial community structure in the sediment. [Conclusion] The bacterial community in the sediment of the Third Drainage Ditch showed obvious spatial differences and was greatly affected by nitrogen. The microorganisms involved in nitrogen cycle remain to be studied.