Dairy mastitis is an inflammatory reaction caused by mechanical injury and stress within the mammary gland, during which microbial changes and abnormal lipid metabolism occur. However, the underlying mechanism is still unclear. The present study used a combination of 16S rDNA sequencing technology and lipidomics techniques to reveal the effects of mastitis on lactic microbiota and metabolites in the milk of dairy cows. Twenty multiparous Holstein dairy cows (2-3 parities) with an average body weight of 580 ± 30 kg were selected for this study. The dairy cows were allocated to control group (<5 × 104 cells /mL)) and mastitis group (>5 × 106 cells /mL) based on the somatic cell count. The results showed that mastitis caused a decrease trend in milk production (p = 0.058). The results of the 16 s sequencing indicated a significant decrease (p < 0.05) in the number of Proteobacteria, Tenericutes colonized in mastitis milk, and the number of Firmicutes, Bacteroidetes and Actinobacteria communities increased significantly (p < 0.05). The lipidomics results revealed that the changes in lipid content in mastitis milk were correlated with arachidonic acid metabolism, α -linolenic acid metabolism and glycerol phospholipid metabolism. The results showed that mastitis may cause abnormal lipid metabolism in milk by regulating the diversity of milk microflora, and ultimately affect the milk quality.