The ruminant digestive system harbors a complex gut microbiome, which is poorly understood in the case of the four stomach compartments of yak. High-throughput sequencing and quantitative PCR were used to analyse microbial communities in the rumen, reticulum, omasum, and abomasum of six domesticated yak. The diversity of prokaryotes was higher in reticulum and omasum than in rumen and abomasum. Bacteroidetes predominated in the four stomach compartments, with abundance gradually decreasing in the trend rumen > reticulum > omasum > abomasum. Microorganism composition was different among the four compartments, all of which contained high levels of bacteria, methanogens, protozoa and anaerobic fungi. Some prokaryotic genera were associated with volatile fatty acids and pH. This study provides the first insights into the microorganism composition of four stomach compartments in yak, and may provide a foundation for future studies in this area.