The nuclear factor-κB (NF-κB)-mediated activation of macrophages plays a key role in mucosal immune responses in Crohn’s disease (CD). Moreover, increasing evidence shows that the activation of peroxisome proliferator-activated receptor-γ (PPAR-γ) exerts satisfactory anti-inflammatory effects in experimental colitis models, mostly by suppressing NF-κB-mediated macrophage activation. Therefore, exploring therapeutic strategies to activate PPAR-γ and inhibit the NF-κB pathway in colonic macrophages holds great promise for the treatment of CD. In this study, five novel pyrazole-containing indolizine derivatives (B1, B2, B3, B4 and B5) were successfully synthesized and characterized, and their anti-inflammatory activities for CD treatment were also investigated. Among the five compounds, compound B4 effectively decreased the NF-κB-mediated production of the pro-inflammatory cytokine TNF-α in LPS-stimulated peritoneal macrophages. Moreover, compound B4 significantly ameliorated 2,4,6-trinitrobenzene sulfonic acid (TNBS)-induced mouse colitis symptoms, including body weight loss, colonic pathological damage and inflammatory cell infiltration. The results of western blotting and luciferase reporter assays indicated that compound B4 activated PPAR-γ and subsequently suppressed NF-κB activation. Conversely, the addition of the PPAR-γ antagonist GW9662 abrogated the anti-inflammatory effects of compound B4 both in vitro and in vivo. In summary, compound B4 activated the PPAR-γ pathway to inhibit downstream NF-κB signaling, which alleviated experimental colitis. Thus, this compound may serve as a potential therapeutic agent for patients with CD.