Astragalin (AST) is a flavonoid glycoside commonly found in edible plants and medicinal herbs with a variety of therapeutic effects. This study aimed to investigate whether AST protects the integrity of the blood-brain barrier (BBB) and inhibits neuroinflammation, thereby alleviating depressive-like behaviors. LPS-stimulated cultured cells and LPS-induced BBB disruption and depressive-like behavior mice models were employed. We founded that AST inhibited LPS-induced inflammatory responses in microglial BV2 cells and protected SH-SY5Y cells from inflammatory injury. In mice, AST effectively ameliorated LPS-induced depressive-like behaviors, which was attributed to its ability to maintain BBB integrity and inhibit inflammatory damage caused by LPS invasion. Furthermore, AST suppressed LPS-induced activation of glial cells, protecting neuronal dendritic spines, synapses, and mitochondria from inflammatory damage. It also reduced the elevation of pro-inflammatory factors such as TNF-α, IL-1β, and IL-6, and normalized the aberrant activation of inflammatory signaling pathways, including RIPK1/RIPK3/MLKL and mTOR/NF-κB. In conclusion, AST protects BBB integrity and brain tissue from inflammatory damage, offering new insights for drug development and clinical interventions in systemic inflammatory responses, such as sepsis-induced encephalitis.