The purpose of this study was to investigate the protective effects and mechanisms of the essential oil of Zanthoxylum bungeanum pericarp (ZBEO) on dextran sulfate sodium (DSS)-induced experimental colitis in mice. ZBEO decreased DSS-induced body weight loss, the disease activity index, colon length shortening, colonic pathological damage, and myeloperoxidase activities. The production of pro-inflammatory mediators was significantly alleviated by ZBEO. Further mechanistic analysis showed that ZBEO inhibited inflammation by regulating NF-kappa B and PPAR gamma pathways. ZBEO also inhibited NLRP3 activation in colitis in mice. Furthermore, ZBEO contributed to the maintenance of tight junction architecture by regulating the expression of zonula occludens-1 during colitis. Surprisingly, treatment with ZBEO increased levels of the commensal bacteria containing Lactobacillus and Bifidobacteria but reduced Escherichia coli levels in the feces of mice. These results suggested that supplementation with ZBEO might provide a new dietary strategy for the prevention of ulcerative colitis.