We aimed to use microsatellite BM1258 loci of the major histocompatibility complex (MHC) as an indicator of the influence of genetic diversity of immunity in goats (Dazu Black, Hechuan White, Meigu, and Tibetan goat). In total, 132 animals comprising 50 Dazu Black goats, 24 Hechuan White goats, 34 Meigu goats, and 24 Tibetan goats were examined. Collectively, 18 different alleles and 42 genotypes were found. The overall observed levels of heterozygosity showed large divergence from the expected levels in the four breeds, and an increase in the mean number of alleles of BM1258 accompanied decreasing altitude of the livestock’s habitat. Our results indicate that low-altitude regions or plains were more conducive to genetic material exchange and gene flow between different populations. In addition, it seems that the breeds from low-altitude regions were less susceptible to problems introduced by commercial animals.