Background: Ulcerative colitis (UC), a highly relapsing non-specific disease, is difficult to cure completely. The investigation aims to determine the protective effect and potential action mechanism of Xuanbi yuyang decoction (XBD) on UC. Methods: The chemical composition of XBD was determined through non-targeted metabolomics analysis. Subsequently, experimental mice were orally given 3% DSS for 6 days, followed by XBD treatment (0.3 mL, 0.4 mL). In vitro, the human colon epithelial cells were co-treated with DSS and medicated serum. The therapeutic effects of XBD on UC were evaluated in vivo and vitro. The mechanisms of XBD against UC were determined by detecting hallmarks related to pyroptosis and Interleukin (IL)-17 pathways using Western blot and ELISA. The recombinant human interleukin 17A (rhIL17A) and was applied for further verifying the effect of XBD on IL-17 pathway in UC cells. Results: XBD supplementation restored DSS-induced weight loss, colon shortening and tissue damage, and reduced DAI. Moreover, XBD enhanced viability, repaired the intestinal mucosal barrier of colitis, decreased pro-inflammatory cytokines levels, and inhibited pyroptosis. Additionally, DSS increased the expression of IL-17 pathway was and cytokines (IL-17A, IL-6), which were blocked by XBD treatment. The rhIL17A treatment attenuated protective effect against DSS-induced colitis and could also enhance pyroptosis. Conclusion: XBD has a favorable protective effect against DSS-induced colitis through restraining pyroptosis via inhibition of IL-17 signaling pathway activation, suggesting XBD may be a new and effective treatment therapy for UC.