Abstract Early-life adversity is a major risk factor for anxiety disorders and functional gastrointestinal diseases, yet how early stress induces persistent dysfunction of the brain-gut axis remains incompletely understood. Here, we show that neonatal maternal separation (MS) induces sustained anxiety-like behaviors in mice and triggers a long-lasting microglia-driven neuroinflammatory state. MS mice exhibited increased microglial activation in the brain, elevated circulating levels of the immunomodulator serotonin (5-HT), and chronic neuroinflammatory responses in both the central nervous system and peripheral circulation. This microglial activation–associated inflammatory state preceded and was closely linked to the progressive development of IBS-like gastrointestinal dysfunction, characterized by visceral hypersensitivity, impaired intestinal barrier integrity, and low-grade intestinal inflammation. These gut abnormalities were accompanied by marked microbial dysbiosis, notably a selective reduction in protective, butyrate-producing taxa such as Faecalibaculum rodentium and Blautia producta, further exacerbating the pro-inflammatory state. Importantly, oral supplementation with sodium butyrate not only restored gut barrier function and microbial balance but also effectively suppressed microglial activation and alleviated anxiety-like behaviors. Collectively, our findings identify microglial activation as a central driver linking early-life stress to chronic inflammation, microbial dysbiosis, and IBS-like gastrointestinal dysfunction. This study highlights microglia–microbiota–butyrate signaling as a critical regulatory axis in brain–gut communication and suggests that targeting microglial-driven inflammation may represent a promising therapeutic strategy for early-life stress–associated anxiety disorders and functional gastrointestinal diseases.