Inflammatory bowel disease (IBD) is a chronic inflammatory disorder with gut microbiota disequilibrium and regulatory T (Treg)/T helper 17 (Th17) immune imbalance. Stigmasterol, a plant-derived sterol, has shown anti-inflammatory effects. Our study aimed to identify the effects of stigmasterol on experimental colitis and the related mechanisms. Stigmasterol treatment restored the Treg/Th17 balance and altered the gut microbiota in a dextran sodium sulfate (DSS)-induced colitis model. Transplantation of the faecal microbiota of stigmasterol-treated mice significantly alleviated inflammation. Additionally, stigmasterol treatment enhanced the production of gut microbiota-derived short-chain fatty acids (SCFAs), particularly butyrate. Next, human naïve CD4+ T cells sorted from IBD patients were cultured under Treg- or Th17-polarizing conditions; butyrate supplementation increased the differentiation of Tregs and decreased Th17 cell differentiation. Mechanistically, butyrate activated peroxisome proliferator-activated receptor gamma (PPARγ) and reprogrammed energy metabolism, thereby promoting Treg differentiation and inhibiting Th17 differentiation. Our results demonstrate that butyrate-mediated PPARγ activation restores the balance of Treg/Th17 cells, and this may be a possible mechanism, by which stigmasterol attenuates IBD.