In this study, we used alkaloids from Sophora flavescens to inhibit the SASP, leading to fibroblast-into-myofibroblast transition (FMT) to maintain intestinal mucosal homeostasis in vitro and in vivo. We used western blotting (WB) and immunofluorescence staining (IF) to assess whether five kinds of alkaloids inhibit the major inflammatory pathways and chose the most effective compound (sophocarpine; SPC) to ameliorate colorectal inflammation in a dextran sulfate sodium (DSS)-induced UC mouse model. IF, Immunohistochemistry staining (IHC), WB, disease activity index (DAI), and enzyme-linked immunosorbent assay (ELISA) were conducted to investigate the mechanism of action of this compound. Next, we detected the pharmacological activity of SPC on the senescence-associated secretory phenotypes (SASP) and FMT in interleukin 6 (IL-6)–induced senescence-like fibroblasts and discussed the mucosal protection ability of SPC on a fibroblast–epithelium/organoid coculture system and organ-on-chip system. Taken together, our results provide evidence that SPC alleviates the inflammatory response, improves intestinal fibrosis and maintains intestinal mucosal homeostasis in vivo. Meanwhile, SPC was able to prevent IL-6–induced SASP and FMT in fibroblasts, maintain the expression of TJ proteins, and inhibit inflammation and genomic stability of colonic mucosal epithelial cells by activating SIRT1 in vitro. In conclusion, SPC treatment attenuates intestinal fibrosis by regulating SIRT1/NF-κB p65 signaling, and it might be a promising therapeutic agent for inflammatory bowel disease.