BackgroundThe influence of diet on immune function and resistance to enteric infection and disease is becoming ever more established. Highly processed, refined diets can lead to inflammation and gut microbiome dysbiosis, whilst health-promoting dietary components such as phytonutrients and fermentable fibres are thought to promote a healthy microbiome and balanced mucosal immunity. Chicory (Cichorium intybus) is a leafy green vegetable rich in fibres and bioactive compounds that may promote gut health.ResultsUnexpectedly, we here show that incorporation of chicory into semisynthetic AIN93G diets renders mice susceptible to infection with enteric helminths. Mice fed a high level of chicory leaves (10% dry matter) had a more diverse gut microbiota, but a diminished type-2 immune response to infection with the intestinal roundwormHeligmosomoides polygyrus. Furthermore, the chicory-supplemented diet significantly increased burdens of the caecum-dwelling whipwormTrichuris muris, concomitant with a highly skewed type-1 immune environment in caecal tissue. The chicory-supplemented diet was rich in non-starch polysaccharides, particularly uronic acids (the monomeric constituents of pectin). In accordance, mice fed pectin-supplemented AIN93G diets had higherT. murisburdens and reduced IgE production and expression of genes involved in type-2 immunity. Importantly, treatment of pectin-fed mice with exogenous IL-25 restored type-2 responses and was sufficient to allowT. murisexpulsion.ConclusionsCollectively, our data suggest that increasing levels of fermentable, non-starch polysaccharides in refined diets compromises immunity to helminth infection in mice. This diet-infection interaction may inform new strategies for manipulating the gut environment to promote resistance to enteric parasites.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12915-023-01640-z.