The use of anthelminthic drugs has several drawbacks, including the selection of resistant parasite strains. Alternative avenues to mitigate the negative effects of helminth infection involve dietary interventions that might affect resistance and/or tolerance by improving host immunity, modulating the microbiota, or exerting direct anthelmintic effects. The aim of this study was to assess the impact of diet on strongyle infection in horses, specifically through immune-mediated, microbiota-mediated, or direct anthelmintic effects. Horses that were naturally infected with strongyles were fed either a high-fiber or high-starch diet, supplemented with either polyphenol-rich pellets (dehydrated sainfoin) or control pellets (sunflower and hay). When horses were fed a high-starch diet, they excreted more strongyle eggs. Adding sainfoin in the high-starch diet reduced egg excretion. Additionally, sainfoin decreased larval motility whatever the diet. Moreover, the high-starch diet led to a lower fecal bacterial diversity, structural differences in fecal microbiota, lower fecal pH, lower blood acetate, and lower hematocrit compared to the high-fiber diet. Circulating levels of Th1 and Th2 cytokines, lipopolysaccharides, procalcitonin, and white blood cells proportions did not differ between diets. Overall, this study highlights the role of dietary manipulations as an alternative strategy to mitigate the effect of helminth infection and suggests that, in addition to the direct effects, changes in the intestinal ecosystem are the possible underlying mechanism.