Postoperative delirium (POD) is a common complication in elderly surgical patients, with limited targeted interventions due to incomplete understanding of its pathophysiological mechanisms. Central nervous system (CNS) inflammation, involving glial cell activation, particularly astrocytes, is considered crucial in POD development. Butyrate, a four-carbon fatty acid, has shown protective effects in CNS diseases, but its potential in mitigating POD remains unclear. This study aimed to investigate the impact of sodium butyrate on POD in aged mice. Behavioral tests, including open field, Y maze, and food burying tests, demonstrated that sodium butyrate preconditioning ameliorated laparotomy-induced delirium in aged mice. Pre-treatment with sodium butyrate inhibited astrocyte activation in the hippocampus, reduced interleukin-1β (IL-1β), interleukin-6 (IL-6), and tumor necrosis factor-α (TNF-α) expression levels, and protected hippocampal neurons. Furthermore, the study revealed a connection between gut microbiota regulation and central neuroprotective effects mediated by astrocyte activation inhibition. Sodium butyrate improved the intestinal morphological barrier by rebalancing gut microbiota, inhibiting Proteobacteria and Actinobacteria, reducing Allobaculum and Bacteroides abundance, and increasing Oscillospira abundance. This regulation decreased gut permeability, limiting the entry of toxic substances into the bloodstream, thereby reducing inflammation spread and astrocyte overactivation, leading to central anti-inflammatory effects. In conclusion, sodium butyrate may ameliorate POD by inhibiting astrocyte-mediated neuroinflammation through gut microbiota rebalancing.