Nuciferine, a major aporphine alkaloid obtained from the leaves of Nelumbo nucifera, exhibits anti-cancer and anti-inflammatory properties; however, its protective effects against inflammatory bowel diseases (IBD) has never been explored. In this study, an ulcerative colitis (UC) model was established in BALb/c mice by the continuous administration of 5% dextran sulfate sodium (DSS) in drinking water for 1 week. From day 8 to day 14, the DSS-treated mice were divided into a high-dose and a low-dose nuciferine treatment group and were intraperitoneally injected with the corresponding dose of the drug. Body weight loss, disease activity index (DAI), and colon length were measured. Histological changes were observed using hematoxylin and eosin staining. T lymphocyte proliferation was assessed by MTT assay. The ratio of CD3+, CD4+, CD8+, Th1, Th2, Th17, and Treg cells were estimated by flow cytometry. Finally, 16S rRNA sequencing was performed to compare the composition and relative abundance of the gut microbiota among the different treatment groups. The results showed that nuciferine treatment led to a significant improvement in symptoms, such as histological injury and colon shortening in mice with DSS-induced UC. Nuciferine treatment improved the Th1/Th2 and Treg/Th17 balance in the DSS-induced IBD model, as well as the composition of the intestinal microflora. At the phylum level, compared with the control group, the abundance of Firmicutes and Actinobacteriota was decreased in the model group, whereas that of Bacteroidetes increased. Meanwhile, at the genus level, compared with the control group, the numbers of the genera Lachnospiraceae_Clostridium, Bilophila and Halomonas reduced in the model group, while those of Bacteroides, Parabacteroides, and Paraprevotella increased. Notably, nuciferine administration reversed this DSS-induced gut dysbiosis. These results indicated that nuciferine modulates gut microbiota homeostasis and immune function in mice with DSS-induced UC.