This study aimed to investigate the ameliorative effect of the polysaccharides ofPanax quinquefolius(WQP) on ulcerative colitis (UC) induced by dextran sulfate sodium (DSS) in mice and to explore its mechanism. Male C57BL/6J mice were randomly divided into the control group (C), model group (DSS), positive control mesalazine (100 mg/kg, Y) group, and low (50 mg/kg, L), medium (100 mg/kg, M) and high dose (200 mg/kg, H) of WQP groups. The UC model was induced by free drinking water with 2.5% DSS for 7 days. During the experiment, the general condition of the mice was observed, and the disease activity index (DAI) was scored. The conventional HE staining was used to observe pathological changes in mice’s colon, and the ELISA method was used to detect the levels of interleukin-6 (IL-6), IL-4, IL-8, IL-10, IL-1β and tumor necrosis factor-α (TNF-α) in mice’s colon. The changes in gut microbiota in mice were detected by high-throughput sequencing; the concentration of short-chain fatty acids (SCFAs) was determined by gas chromatography; the expression of related proteins was detected by Western blot. Compared with the DSS group, the WQP group showed a significantly lower DAI score of mice and an alleviated colon tissue injury. In the middle- and high-dose polysaccharides groups, the levels of pro-inflammatory cytokines IL-6, IL-8, IL-1β and TNF-α in the colonic tissue were significantly decreased (P<0.05), while the levels of IL-4 and IL-10 were significantly increased (P<0.05). The 16S rRNA gene sequencing results showed that different doses of WQP could regulate the composition and diversity of gut microbiota and improve its structure. Specifically, at the phylum level, group H showed an increased relative abundance ofBacteroidetesand a decreased relative abundance ofFirmicutescompared with the DSS group, which was closer to the case in group C. At the family level, the relative abundance ofRikenellaceaein L, M and H groups increased significantly, close to that in group C. At the genus level, the relative abundance ofBacteroides,ShigellaandOscillospirain the H group increased significantly, while that ofLactobacillusandPrevotelladecreased significantly. The high-dose WQP group could significantly increase the contents of acetic acid, propionic acid, butyric acid, and total SCFAs. Different doses of WQP also increased the expression levels of tight junction proteins ZO-1, Occludin and Claudin-1. To sum up, WQP can regulate the gut microbiota structure of UC mice, accelerate the recovery of gut microbiota, and increase the content of Faecal SCFAs and the expression level of tight junction proteins in UC mice. This study can provide new ideas for the treatment and prevention of UC and theoretical references for the application of WQP.