Silymarin is a flavonolignan complex traditionally used for hepatoprotection, but its interactions with the gastrointestinal microbiota of ruminants remain poorly characterized. This study evaluated the effects of dietary silymarin on ruminal and intestinal microbiota in lactating Jersey cows. Twelve cows were assigned to a crossover design and received either a control diet or the same diet fed with silymarin (5 g/cow/day). Rumen fluid and fecal samples were collected on day 28 of the first experimental period and analyzed by 16S rRNA gene sequencing, alongside ruminal protozoa enumeration. Silymarin intake did not alter alpha or beta diversity of either ruminal or intestinal microbiota. However, differential abundance analyses revealed selective modulation of specific microbial taxa in both compartments. In the rumen, silymarin reduced the relative abundance of taxa previously associated with denitrification and redox processes, while increasing taxa previously associated with diverse nitrogen metabolic capabilities. These changes were accompanied by a significant reduction in ruminal protozoa counts and an enrichment of predicted functional pathways related to nitrogen metabolism, which may be related to the differences in ruminal fermentation. In the intestinal microbiota, silymarin promoted selective taxonomic shifts without disrupting community structure and was associated with enrichment of predicted functional pathways related to NOD-like receptor signaling, indicating differences in the predicted functional potential of the gut microbiota that may be associated with microbiota-host interactions. Overall, silymarin intake selectively modulated the gastrointestinal microbiota without altering its overall community structure, as indicated by the absence of significant changes in alpha and beta diversity, and was associated with changes in predicted functional pathways. Together, these findings are consistent with the hypothesis that silymarin supplementation was associated with selective modulation of the gastrointestinal microbiota and its predicted functional potential, which may be associated with the fermentative and metabolic responses.