Abstract:[Background] Gut microbiota is closely related to the health and environmental adaptability of the host. Yak (Bos grunniens) is a herbivorous ruminant unique to the Qinghai-Tibet Plateau. The effect of altitude on the gut microbiota structure of yaks and the roles of gut microbiota in the adaption of yaks to high altitude, however, are still largely elusive. [Objective] This paper aims to explore the diversity of gut microbiota of yaks grazing on the Qinghai-Tibet Plateau and the relationship with altitude. [Methods] A total of 22 fresh fecal samples were collected from yaks in Maqin (altitude:4 220 m) and Ledu (altitude:2 745 m) of Qinghai, and the V3-V4 region of 16S rRNA gene was amplified with universal primers and then subjected to high-throughput sequencing and analysis. [Results] A total of 1 723 018 valid reads were obtained from the 22 samples, which were clustered into 1 113 operational taxonomic units (OTUs) based on 97% similarity. The OTUs belonged to 263 genera and 22 phyla. Firmicutes, Bacteroidetes, Ruminococcaceae_UCG-005, and Rikenellaceae_RC9_gut_group dominated the samples from the two regions, despite the significant difference in abundance. As the altitude elevated, the abundance of Firmicutes and Ruminococcaceae_UCG-005 significantly increased, while that of Bacteroidetes and Rikenellaceae_RC9_gut_group significantly decreased. As for the structure and difference of gut microbiota, gut microbiota structure of yaks was dramatically affected by altitude. In addition, PICRUSt2 analysis revealed that related metabolic pathways in gut microbiota such as energy metabolism, cofactor and vitamin metabolism, nucleotide metabolism, and glycan and amino acid metabolism were significantly enriched in yaks grazing at the higher altitude, in part because yaks improved forage utilization efficiency and harvested more energy to adapt to the extreme environment at higher altitude.[Conclusion] The gut microbiota structure of yak grazing at different altitudes was obviously different, and gut microbiota was proposed to play an essential role in the adaption of yaks to the environment at high altitude.