The neonatal period of life is critical for bacterial colonization of the gastrointestinal (GI) tract, formation of GI mucosal barrier function, and neural development. Previous studies from our group have shown that infection of adult mice with a bacterial pathogen causes changes in the microbiota‐gut‐brain (MGB) axis, including intestinal dysbiosis and behavioral deficits. However, the relationship between intestinal dysbiosis during the early stages of development and cognitive and behavioral function in adulthood have not been investigated. We hypothesized that dysbiosis due to bacterial infection in early life would lead to a dysregulated MGB axis with lasting deficits into adulthood. A mouse model (C57BL/6) of neonatal bacterial infection with enteropathogenic Escherichia coli (EPEC; strain e2348/69) was used to study effects of intestinal dysbiosis on the MGB axis. Behavior was assessed using the light/dark box (anxiety‐like behavior) and the novel object recognition (NOR) task (cognitive function). The microbiota was characterized by qPCR, and Ussing chambers were used to study intestinal physiology. Mice infected with EPEC as neonates showed impaired memory as adults (p<0.05), without evidence of anxiety‐like behavior compared to sham‐infected controls. This was accompanied with down‐regulation of innate immune pattern recognition receptors (Nod1 and Nod2) and regulatory cytokines (IL10), coupled with up‐regulation of pro‐inflammatory cytokines (TNF‐α) and the serotonin biosynthesis pathway (Tph) in the hippocampus (p<0.05). Neonatal infection resulted in long‐lasting intestinal dysbiosis (decreased Lactobacillus , increased Enterobacteriaceae ) and intestinal pathophysiology characterized by increased secretory state (short circuit current; Isc) and permeability (conductance; G) (p<0.05). Transcriptional analysis of the colon showed down‐regulation of protective gut factors (RegIIIγ) and increased NF‐κB activation in adulthood (p<0.05). In conclusion, our data demonstrates that neonatal bacterial infection leads to alterations of the development of the MGB axis that extend through to adulthood. These findings may have important clinical implications for pediatric patients exposed to bacterial enteric pathogens during early development. Support or Funding Information This work was funded by an APS undergraduate summer research fellowship (JK); NIH 5R21MH108154‐01 (MGG), U54 HD079125 (MGG).