Background: Diet has a profound impact on the rumen microbiota, and the impact can vary among the different rumen ecological niches (REN). This study investigated the effects of dietary replacement of soybean meal (SBM) with dried distillers grains with solubles (DDGS) on the rumen microbiota occupying different REN of growing Hu lambs. After a 9-week feeding trial, 6 lambs from each dietary treatment (SBM vs. DDGS-based diets) were slaughtered for sample collection. The microbiota of the rumen solid, liquid, and epithelium fractions was examined using amplicon sequencing analysis of bacterial 16S rRNA gene, functional prediction, and qPCR. Results: No interaction of dietary protein source (PS) and REN were detected for virtually all the measurements made in this study. The DDGS substitution resulted in very limited influence on bacterial community structure. However, the metabolic pathways predicted from 16S rRNA gene sequences varied greatly between SBM-and DDGS-based diets. The populations of rumen total bacteria, fungi, sulfate-reducing bacteria (SRB), and methanogens were not influenced by DDGS substitution, but the population of protozoa was reduced. The bacterial communities in rumen solid (RS) and liquid (RL) were similar in taxonomic composition but were different in relative abundance of some taxa. In contrast, the bacterial composition and relative abundance of rumen epithelium (RE) were greatly distinct from those of the RS and the RL. In alignment with the bacterial relative abundance, the metabolic pathways predicted from 16S rRNA genes also varied greatly among the different REN. The populations of total bacteria, protozoa, and methanogens attached to the RE were smaller than those in the RS and RL, and the fungal population on the rumen epithelium was smaller than that in the RS but similar to that in the RL. On the contrary, the SRB population on the RE was greater than that in the RS and RL.