Abstract:[Background] Amid large-scale production, the environmental management of cowshed is the key to the milk production of dairy cows. [Objective] To explore the characteristics of soil bacterial communities in different cowsheds and thereby lay a theoretical basis for healthy production of dairy cows. [Methods] Soil samples were collected from 8 different cowsheds: new calf born area (NCA), weaned calf cowshed area (WCA), rearing heifers cowshed area (RCA), low-yield lactating cows cowshed area (LCA), high-yield first-calf lactating cows cowshed area (HFCA), high-yield multiparity lactating cows cowshed area (HMCA), dry cows cowshed area (DCA), and sick cows cowshed area (SCA), with 6 replicates from each cowshed and a total of 48 samples. Through the sequencing of 16S rRNA gene amplicons, the structures and diversities of the bacterial communities were analyzed and the functions of different communities were predicted. [Results] The bacterial community composition of soil samples was different among the cowsheds. Among the 8 cowsheds, HFCA boasted the highest bacterial community diversity, and NCA showed huge difference in the bacterial community of soil at phylum level from other cowsheds. Moreover, LCA, HFCA, and HMCA respectively showed high similarity in the community structure among soil samples. At the phylum level, Bacteroidetes, Proteobacteria, Actinobacteria, and Firmicutes dominated all the soil samples. At the genus level, the haloalkaliphilic Halomonas, Fermentimonas and Aequorivita with potential degrading ability, and the pathogenic Ornithobacterium were dominant in the soil samples collected from cowsheds for calves. Haloalkaliphilic Truepera dominated RCA, and the pathogenic Acinetobacter and Parapedobacter, and the drug-resistant Pedobacter were the dominant genera in the soil samples collected from cowsheds for lactating cows. [Conclusion] Pathogenic bacteria and bacteria involved in nitrate respiration are mainly distributed in LCA and haloalkaliphilic bacteria are mainly found in WCA and RCA. Methanogenic bacteria are mainly discovered in HFCA. This study analyzed the diversity of soil bacterial community in different cowsheds to lay a theoretical basis for the healthy production of dairy cows.