Subclinical mastitis is a common disease that threatens the welfare and health of dairy cows and causes huge economic losses. Somatic cell count (SCC) is the most suitable indirect index used to evaluate the degree of mastitis. To explore the relationship between SCC, diversity in the microbiome, and subclinical mastitis, we performed next-generation sequencing of the 16S rRNA gene of cow's milk with different SCC ranges. The data obtained showed that the microbiota was rich and coordinated with SCC below 2 × 105. SCC above 2 × 105 showed a decrease in the diversity of microbial genera. When SCC was below 2 × 105, the phylum Actinobacteriota accounted for the most. When SCC was between 2 × 105 and 5 × 105, Firmicutes accounted for the most, and when SCC exceeded 5 × 105, Firmicutes and Proteobacteria accounted for the most. Pathogenic genera such as Streptococcus spp. were absent, while SCC above 2 × 105 showed a decrease in the diversity of microbial genera. SCC was positively correlated with the percentage of Romboutsia, Turicibacter, and Paeniclostridium and negatively correlated with the percentage of Staphylococcus, Psychrobacter, Aerococcus, and Streptococcus. Romboutsia decreased 6.19 times after the SCC exceeded 2 × 105; the SCC increased exponentially from 2 × 105 to 5 × 105 and above 1 × 106 in Psychrobacter. Analysis of the microbiota of the different SCC ranges suggests that the development of mastitis may not only be a primary infection but may also be the result of dysbiosis in the mammary gland.