Highland barley β-glucan (HBG) has attracted increasing attention due to its excellent biological activities. However, the effects of HBG on gut flora and metabolites are unknown. Therefore, the effects of HBG on the gut microbiota during fermentation were analyzed by 16 s rRNA sequencing and untargeted metabolomics. The results showed that HBG could enrich microbial diversity, increase the abundance of beneficial bacteria, and inhibit the biology of pathogenic bacteria. In addition, HBG increased the content of short-chain fatty acids and decreased fermentation broth pH. Metabolomics analyses showed that HBG also increased the content of beneficial metabolites such as taurine and affected amino acid metabolism, among other pathways. This study lays the foundation for the application of HBG in functional foods.