Background The treatment of ulcerative colitis (UC) remains a huge challenge worldwide. Xiaoyao Pill (XYP) is a classic TCM formula, which possesses several benefits, including soothing the liver and invigorating the spleen. However, its protective effect on UC and its underlying mechanisms are unknown. Purpose: Here we explored the protective effect and underlying mechanism of XYP against dextran sulfate sodium (DSS)-induced colitis in mice. Methods The experimental colitis was established by adding 3% DSS on drinking water of mice and the effects of XYP (0.32 and 0.64 mg/kg/d, i.g., by 10 days) in colon tissues was analyzed. Transcriptomic analysis elucidated therapeutic targets, subsequently validated through molecular techniques and cellular assays. NCM460 cell was induced by RSL3 to detect the effect of XYP on ferroptosis and the underlying mechanism. Pathological damage was determined by H&E. Indicators related to intestinal permeability were detected by immunohistochemistry and immunofluorescence. Cytokines levels (TNF-α、IL-1β and IL-6), antioxidant enzymes activities (MDA, SOD and GSH) from colon tissues of each group mice, the level of Fe 2+ Cytokines levels and Gpx4 activity from colon tissues of each group mice or cells were detected by ELISA. Intracellular ROS levels in each group of cells were detected by H 2 DCFDA fluorescence staining. Finally, the key mediating role of nuclear factor erythroid 2-like 2 (Nrf2) in the XYP treatment was explored by cell transfection using siRNA or plasmid injection. Results The results indicated that XYP significantly attenuated DSS-induced colon pathological damage, intestinal barrier, cytokines levels, and increased the antioxidant enzymes activities. Transcriptomic analyses illustrated that XYP might alleviate UC by inhibiting ferroptosis. Moreover, XYP attenuated ferroptosis in DSS-induced colon injury and regulated Nrf2/Gpx4 signaling pathway in DSS-induced mice. Mechanistic experiments verified that XYP activated Nrf2 in vitro . Conclusion Taken together, this study evaluates that XYP alleviates DSS-induced colitis mice by inhibiting ferroptosis of enterocytes and its protective effects are associated with activating the Nrf2/Gpx4 signaling pathway.