Inflammatory bowel disease (IBD) is a global disease with limited therapy. It is reported that sedanolide exerts anti-oxidative and anti-inflammatory effects as a natural phthalide, but its effects on IBD remain unclear. In this study, we investigated the impacts of sedanolide on dextran sodium sulfate (DSS)-induced colitis in mice. The mice were administered sedanolide or vehicle followed by DSS administration, after which colitis symptoms, inflammation levels, and intestinal barrier function were evaluated. Transcriptome analysis, 16S rRNA sequencing, and targeted metabolomics analysis of bile acids and lipids were performed. Sedanolide protected mice from DSS-induced colitis, suppressed the inflammation, restored the weakened epithelial barrier, and modified the gut microbiota by decreasing bile salt hydrolase (BSH)-expressing bacteria. The downregulation of BSH activity by sedanolide increased the ratio of conjugated/unconjugated bile acids (BAs), thereby inhibiting the intestinal farnesoid X receptor (FXR) pathway. The roles of the FXR pathway and gut microbiota were verified using an intestinal FXR-specific agonist (fexaramine) and germ-free mice, respectively. Furthermore, we identified the key effector ceramide, which is regulated by sphingomyelin phosphodiesterase 3 (SMPD3). The protective effects of ceramide (d18:1/16:0) against inflammation and the gut barrier were demonstrated in vitro using the human cell line Caco-2. Sedanolide could reshape the intestinal flora and influence BA composition, thus inhibiting the FXR-SMPD3 pathway to stimulate the synthesis of ceramide, which ultimately alleviated DSS-induced colitis in mice. Overall, our research revealed the protective effects of sedanolide against DSS-induced colitis in mice, which indicated that sedanolide may be a clinical treatment for colitis. Additionally, the key lipid ceramide (d18:1/16:0) was shown to mediate the protective effects of sedanolide, providing new insight into the associations between colitis and lipid metabolites.