At present, there are few reports on bacterial diversity of Alxa white cashmere goat milk and its dairy products.The results of this study showed that there were significant differences in bacterial diversity and abundance of Alxa white cashmere goat milk and its dairy products (p < 0.05), The dominant bacteria phylum and dominant bacteria genus are changed when goat milk is made into traditional dairy products. In this study, we found that there were many unspecified bacterial genera in goat milk and its dairy products, which need to be further studied. In addition, the relative abundance of foodborne pathogenic bacteria generic such as Enterobacter, Enterococcus, Raoultella and Pseudomonas in dairy products decreased sharply, which provided a reference for the safety evaluation of goat milk and its dairy products. Prediction of bacterial gene function by PICRUSt2 software revealed that the main bacterial metabolic pathways in goat milk and dairy products were Global and overview maps, Carbohydrate metabolism and Amino acid metabolism, etc. This study shows that there are differences in the functions of metabolism-related genes in goat milk and dairy products, which further indicates that the functions of these major metabolic genes are closely related to probiotics in traditional dairy products. In summary, the results of this study not only have a certain understanding of the bacterial diversity in Alxa white cashmere goat milk and its dairy products, but also provide a reference for the study of probiotics, functional genes and safety evaluation in goat milk and its dairy products.