M1 macrophage-mediated inflammation is critical in sepsis. We previously found protective role of Astragaloside IV (AS-IV) in sepsis-associated gut impairment, whose specific mechanism remains unknown. Gut microbiota modulates gut homeostatic balance to avoid excessive inflammation. Here, we aimed to investigate effects of AS-IV on gut macrophages polarization and potential roles of gut microbiota and short chain fatty acids (SCFA) in septic gut damage. Mice were pre-treated by AS-IV gavage for 7 days before cecal ligation and puncture (CLP). M1 polarization of gut lamina propria macrophages (LpMs) was promoted by CLP, accompanied by abnormal cytokines release and intestinal barrier dysfunction. NLRP3 inflammasome was activated in M1 LpMs. 16S rRNA sequencing demonstrated gut microbiota imbalance. The levels of acetate, propionate and butyrate in fecal samples decreased. Notably, AS-IV reversed LpMs M1/M2 polarization, lightened gut inflammation and barrier injury, reduced NLRP3 inflammasome expression in LpMs, restored the diversity of gut microbiome and increased butyrate levels. Similarly, these benefits were mimicked by fecal microbiota transplantation (FMT) or exogenous butyrate supplementation. In Caco-2 and THP-1 co-cultured model, lipopolysaccharide (LPS) and interferon-γ (IFN-γ) caused THP-1 M1 polarization, Caco-2 barrier impairment, abnormal cytokines release and high NLRP3 inflammasome expression in THP-1 cells, all of which were mitigated by butyrate administration. However, these protective effects of butyrate were abrogated by NLRP3 gene overexpression in THP-1. In conclusion, AS-IV can ameliorate sepsis-induced gut inflammation and barrier dysfunction by modulating M1/M2 polarization of gut macrophages, whose underlying mechanism may be restoring gut microbiome and SCFA to restrain NLRP3 inflammasome activation.