Residual feed intake (RFI) is one of the indicators of feed efficiency. To investigate the microbial characteristics and differences in the gastrointestinal tract of beef cattle with different RFI, a metagenome methodology was used to explore the characteristics of the rumen and fecal microbiota in 10 Qinchuan cattle (five in each of the extremely high and extremely low RFI groups). The results of taxonomic annotation revealed that Bacteroidetes and Firmicutes were the most dominant phyla in rumen and feces. Prevotella was identified as a potential biomarker in the rumen of the LRFI group by the LEfSe method, while Turicibacter and Prevotella might be potential biomarkers of the HRFI and LRFI group in feces, respectively. Functional annotation revealed that the microbiota in the rumen of the HRFI group had a greater ability to utilize dietary polysaccharides and dietary protein. Association analysis of rumen microbes (genus level) with host genes revealed that microbiota including Prevotella, Paraprevotella, Treponema, Oscillibacter, and Muribaculum, were significantly associated with differentially expressed genes regulating RFI. This study discovered variances in the microbial composition of rumen and feces of beef cattle with different RFIs, demonstrating that differences in microbes may play a critical role in regulating the bovine divergent RFI phenotype variations.