We evaluated the influence of diets differing in non-fiber carbohydrates and rumen-degradable protein (RDP) levels on changes in the ruminal bacterial populations in lactating Holstein cows. In all, 12 ruminally cannulated cows were assigned to diets with high or low RDP levels. Within each RDP level, molasses was substituted for corn grain at a concentration of 0%, 5.25%, or 10.5% of diet dry matter in a replicated 3 × 3 Latin square design with 28-day periods. Liquid and solid rumen digesta fractions collected at the end of each period underwent 16S rRNA gene sequencing to identify operational taxonomic units and were analyzed for short-chain fatty acids. Protein degradability affected 6 bacterial genera, whereas carbohydrate alteration impacted 13 genera (p < 0.05). Of the 30 genera with the highest relative abundance, 26 differed by digesta fraction (p < 0.05), with Bacteroidetes genera showing a greater abundance in solids and Firmicutes genera demonstrating a greater prevalence in liquids. Regarding relative abundances, with increasing molasses, Succiniclasticum decreased in liquid (p < 0.05), and CF231, YRC22, Clostridium, Desulfovibrio, BF311, and Oscillospira increased in solids (p < 0.05). In contrast, at higher RDP levels, Succiniclasticum increased while YRC22 and Pseudobutyrivibrio decreased in solids (p < 0.05). Genera with abundances found to be correlated with fermentation products in the liquid included Shuttleworthia, Treponema, Lachnospira, and Schwartzia, which typically have lower relative abundances, showing strong positive correlations with molar proportions (mol%) of propionate, butyrate, and valerate (p < 0.05), and negative correlations with pH and acetate mol% (p < 0.05). Fibrobacter was positively correlated with lactate mol% (p < 0.05). Butyrate mol% exhibited a quadratic increase as molasses increased (p = 0.017), and lactate mol% rose with increased RDP levels (p = 0.042). No treatment effects were detected for pH propionate and valerate mol%; however, we observed a tendency (p = 0.075) for a quadratic effect of molasses treatment on the mol% of acetate. These findings substantiate the pivotal role of diet in shaping rumen microbiota and metabolism, elucidating a nuanced relationship between dietary components, bacterial community structure, and metabolic output. This offers a more detailed understanding of rumen function and the potential for high-precision dietary management in lactating cows.