Inflammatory bowel disease (IBD) is a chronic inflammatory disease of the colon. The aim of the present study was to explore the effects of leonurine (YMJ) on inflammation and intestinal microflora in colonic tissues of a dextran sulfate sodium (DSS)-induced ulcerative colitis (UC) mouse model. Mice were randomly divided into control (n=5), DSS (n=5, treated with DSS) and DSS+YMJ (n=5, treated with DSS and YMJ) groups. Body weight was recorded, disease activity index (DAI) was calculated, and colon histopathology was evaluated using hematoxylin and eosin staining. Serum interleukin (IL)-6, tumor necrosis factor-α (TNF-α) and IL-1β levels were examined using ELISA. Expression levels of nuclear factor-κB (p65) and phosphorylated (p)-p65 were evaluated via western blotting. 16S ribosomal RNA was extracted from mouse feces. Composition or abundance changes of intestinal microflora were analyzed. The results indicated that YMJ treatment (DSS+YMJ group) significantly increased body weight, reduced DAI scores and increased colon length in UC mouse models compared with those in the DSS group (P<0.05). YMJ significantly reduced inflammatory infiltration, significantly decreased serum TNF-α, IL-6 and IL-1β levels (P<0.05) and significantly downregulated the p-p65/p65 ratio compared with the DSS group (P<0.05). YMJ increased the quantity of the intestinal flora and improved intestinal microflora diversity in the mice of the DSS group. Specifically, YMJ partly regulated intestinal microflora in feces, including a reduction of
Bifidobacterium
, and an increase in
Parasutterella
and
Ackermania
. In conclusion, YMJ improved disease outcomes of the UC mice, reduced the levels of serum inflammatory factors and increased the ratio of beneficial bacteria in the intestinal tract.