Dysregulation of gut homeostasis is associated with irritable bowel syndrome (IBS), a chronic functional gastrointestinal disorder affecting approximately 11.2% of the global population. The poorly understood pathogenesis of IBS has impeded its treatment. Here, we report that the E3 ubiquitin ligase tripartite motif-containing 27 (TRIM27) is weakly expressed in IBS but highly expressed in inflammatory bowel disease (IBD), a frequent chronic organic gastrointestinal disorder. Accordingly, knockout of Trim27 in mice causes spontaneously occurring IBS-like symptoms, including increased visceral hyperalgesia and abnormal stool features, as observed in IBS patients. Mechanistically, TRIM27 stabilizes β-catenin and thus activates Wnt/β-catenin signaling to promote intestinal stem cell (ISC) self-renewal. Consistent with these findings, Trim27 deficiency disrupts organoid formation, which is rescued by reintroducing TRIM27 or β-catenin. Furthermore, Wnt/β-catenin signaling activator treatment ameliorates IBS symptoms by promoting ISC self-renewal. Taken together, these data indicate that TRIM27 is critical for maintaining gut homeostasis, suggesting that targeting the TRIM27/Wnt/β-catenin axis could be a potential treatment strategy for IBS. Our study also indicates that TRIM27 might serve as a potential biomarker for differentiating IBS from IBD.