Mastitis is an inflammation of the mammary gland that can be caused by various factors, including biological, chemical, mechanical, or physical. Microbiological culture, DNA techniques, and high-throughput next-generation sequencing have been used to identify mastitis-causing pathogens in various animal species. However, little is known about microbiota and microbiome changes linked to yak milk mastitis. This study aimed to characterize the milk microbiota of healthy and mastitis-infected yaks using full-length 16S rRNA sequencing. The results showed that the bacterial microbiota comprises 7 phyla, 9 classes, 20 orders, 39 families, 59 genera, and 72 species. Proteobacteria and Firmicutes were the predominant microbial communities, with lower abundances of Bacteroidota, Actinobacteriota, Acidobacteriota, and other minor groupings also observed. Proteobacteria dominated the clinical and subclinical mastitis groups (95.36% and 89.32%, respectively), in contrast to the healthy group (60.17%). Conversely, Firmicutes were more common in the healthy group (39.7%) than in the subclinical and clinical mastitis groups (10.49% and 2.92%, respectively). The predominant organisms found in the healthy group were Leuconostoc mesenteroides, Lactococcus piscium, Carnobacterium maltaromaticum, and Lactococcus raffinolactis. Low abundances of Staphylococcus aureus species were found in both subclinical and clinical mastitis groups, with Moraxella osloensis and Psychrobacter cibarius dominating the subclinical mastitis group and Pseudomonas fluorescens dominating the clinical mastitis group. An alpha diversity study revealed that the healthy group had a higher microbial diversity than the clinical and subclinical mastitis groups. According to beta-diversity analysis, the principal coordinate analysis identified that mastitis-infected samples significantly differed from healthy ones. The milk microbiota of healthy yaks is more varied, and specific prominent taxa within various groups can act as marker microorganisms for mastitis risk. The genera Leuconostoc and Lactococcus are promising candidates for creating probiotics.