We investigated the protective effect of Rehmannia glutinosa oligosaccharides (RGO) on lipopolysaccharide (LPS)-induced intestinal inflammation and barrier injury among mice. RGO is prepared from fresh rehmannia glutinosa by water extraction, active carbon decolorization, ion exchange resin impurity removal, macroporous adsorption resin purification, and decompression drying. LPS could establish the model for intestinal inflammation and barrier injury in mice. Three different doses of RGO were administered for three consecutive weeks. Then the weight, feces, and health status of the mice were recorded. After sacrificing the mice, their colon length and immune organ index were determined. The morphological changes of the ileum and colon were observed using Hematoxylin-eosin (H&E) staining, followed by measuring the villus length and recess depth. RT-qPCR was utilized to detect the relative mRNA expression of intestinal zonula occludens-1 (ZO-1) and occludin. The expression of inflammatory factors and oxidation markers within ileum and colon tissues and the digestive enzyme activities in the ileum contents were detected using ELISA. The content of short-chain fatty acids (SCFAs) in the colon was determined with GC. The gut microbial composition and diversity changes were determined with 16S-rRNA high-throughput sequencing. The association between intestinal microorganisms and SCFAs, occludins, digestive enzymes, inflammatory factor contents, and antioxidant indexes was also analyzed. RGO significantly increased the weight, pancreatic index, thymus index, and colon length of mice compared with the model group. Moreover, it also improved the intestinal tissue structure and increased the expression of intestinal barrier-related junction proteins ZO-1 and Occludin. The contents of IL-6, IL-17, IL-1β, and TNF-α in the intestinal tissues of mice were significantly reduced. Additionally, the activities of superoxide dismutase (SOD), glutathione peroxidase (GSH-Px), and catalase (CAT) were elevated. In contrast, the malondialdehyde (MDA) content decreased. Trypsin and pancreatic lipase activities in the ileum enhanced, and the SCFA contents such as acetic acid, propionic acid, and butyric acid in the colon increased. The study on intestinal flora revealed that RGO could enhance the abundance of intestinal flora and improve the flora structure. After RGO intervention, the relative abundance of Firmicutes, Lactobacillus, and Akkermania bacteria in the intestinal tract of mice increased compared with the model group, while that of Actinomycetes decreased. The intestinal microbiota structure changed to the case, with probiotics playing a dominant role. The correlation analysis indicated that Lactobacillus and Ackermann bacteria in the intestinal tract of mice were positively associated with SCFAs, Occludin, ZO-1, pancreatic amylase, SOD, and CAT activities. Moreover, they were negatively correlated with inflammatory factors IL-6, IL-17, IL-1β, and TNF-α. RGO can decrease LPS-induced intestinal inflammation and intestinal barrier injury in mice and protect their intestinal function. RGO can ameliorate intestinal inflammation and maintain the intestinal barrier by regulating intestinal flora.