Increased intestinal barrier permeability, leaky gut, has been reported in patients with autism. However, its contribution to the development of autism has not been determined. We selected dextran sulfate sodium (DSS) to disrupt and metformin to repair the intestinal barrier in BTBR T+tf/J autistic mice to test this hypothesis. DSS treatment resulted in a decreased affinity for social proximity; however, autistic behaviors in mice were improved after the administration of metformin. We found an increased affinity for social proximity/social memory and decreased repetitive and anxiety-related behaviors. The concentration of lipopolysaccharides in blood decreased after the administration of metformin. The expression levels of the key molecules in the toll-like receptor 4 (TLR4)–myeloid differentiation factor 88 (MyD88)–nuclear factor kappa B (NF-κB) pathway and their downstream inflammatory cytokines in the cerebral cortex were both repressed. Thus, “leaky gut” could be a trigger for the development of autismviaactivation of the lipopolysaccharide-mediated TLR4–MyD88–NF-κB pathway.Supplementary InformationThe online version contains supplementary material available at 10.1007/s12264-022-00993-9.