Dietary fibre regulates the microbiome and gut health but increases murine whipworm (Trichuris muris) infection through unclear mechanisms. We show that mice fed inulin-supplemented diets exhibit dysregulated innate antimicrobial defences and altered tryptophan metabolism during T. muris infection. Inhibiting tryptophan catabolism or neutralizing IL-27 and IL-18 in inulin-fed mice restored infection resistance. Notably, inulin led to chronic infection even in microbiota-depleted mice. Removing inulin within a critical immune development window rapidly restored anti-helminth immunity, indicating direct, time-dependent modulation of mucosal immune responses. Our findings reveal a previously unrecognized, direct influence of dietary fibre on mucosal immunity to parasitic infection, independent of the microbiome, highlighting the complex interplay between diet timing and host defence.