In this study, the V3 and V4 regions of the 16S rRNA gene from metagenomic DNA were sequenced to identify differences in microbial diversity in raw milk of Saanen and Guanzhong goats from the Guanzhong area of China. The results showed that Proteobacteria was the predominant phylum, accounting for 71.31% of all phyla identified in milk from the 2 breeds, and Enterobacter was the predominant genus (24.69%) within the microbial community. Microbial alpha diversity from Saanen goat milk was significantly higher than that of Guanzhong goat milk based on bioinformatic analysis of indices of Chao1, Shannon, Simpson, observed species, and the abundance-based coverage estimator. Functional genes and their likely metabolic pathways were predicted, which demonstrated that the functional genes present in the bacteria in goat milk were enriched in pathways for amino acid metabolism and carbohydrate metabolism, which represented 11.93 and 11.23% of functional genes, respectively. Physicochemical properties such as pH, protein, fat, and AA levels were also determined and correlations made with microbial diversity. We detected a significant difference in the content of lactose and 6 AA, which were higher in Saanen milk than in Guanzhong milk, and positively correlated with microbial carbohydrate metabolism and AA metabolism. Lactococcus, Lactobacillus, Bifidobacterium, Enterococcus, and Streptococcus, which are lactose-utilizing genera, were more abundant in Saanen milk than in Guanzhong milk. Higher levels of lactose in Saanen goat milk may explain its greater microbial diversity. We also demonstrated that most of the AA metabolism-related bacterial genera (e.g., Massilia, Bacteroides, Lysobacter) were enriched in Saanen goat milk. In this research, both probiotic and pathogenic bacteria were identified in goat milk, which provided the microbial information necessary to direct the utilization of beneficial microbial resources and prevent the development of harmful organisms in goat milk.