The incidence of autoimmune and inflammatory diseases has risen dramatically in post-industrial societies. “Biome depletion” – loss of commensal microbial and multicellular organisms such as helminths (intestinal worms) that profoundly modulate the immune system – may contribute to these increases. Hyperimmune-associated disorders also affect the brain, especially neurodevelopment, and increasing evidence links early-life infection to cognitive and neurodevelopmental disorders. We have demonstrated previously that rats infected with bacteria as newborns display life-long vulnerabilities to cognitive dysfunction, a vulnerability that is specifically linked to long-term hypersensitivity of microglial cell function, the resident immune cells of the brain. Here, we demonstrate that helminth colonization of pregnant dams attenuated the exaggerated brain cytokine response of their offspring to bacterial infection, and that combined with post-weaning colonization of offspring with helminths (consistent with their mothers treatment) completely prevented enduring microglial sensitization and cognitive dysfunction in adulthood. Importantly, helminths had no overt impact on adaptive immune cell subsets, whereas exaggerated innate inflammatory responses in splenic macrophages were prevented. Finally, helminths altered the effect of neonatal infection on the gut microbiome; neonatal infection with Escherichia coli caused a shift from genera within the Actinobacteria and Tenericutes phyla to genera in the Bacteroidetes phylum in rats not colonized with helminths, but helminths attenuated this effect. In sum, these data point toward an inter-relatedness of various components of the biome, and suggest potential mechanisms by which this helminth might exert therapeutic benefits in the treatment of neuroinflammatory and cognitive disorders.