Constipation is a common problem in sows and women during late pregnancy. Dietary fiber has potential in the regulation of intestinal microbiota, thereby promoting intestinal motility and reducing constipation. However, the effects of fibers with different physicochemical properties on intestinal microbe and constipation during late pregnancy have not been fully explored. In this study, a total of 80 sows were randomly allocated to control and one of three dietary fiber treatments from day 85 of gestation to delivery: LIG (lignocellulose), PRS (resistant starch), and KON (konjaku flour). Results showed that the defecation frequency and fecal consistency scores were highest in PRS. PRS and KON significantly increased the level of gut motility regulatory factors, 5‐hydroxytryptamine (5‐HT), motilin (MTL), and acetylcholinesterase (AChE) in serum. Moreover, PRS and KON promoted the IL‐10 level and reduced the TNF‐α level in serum. Furthermore, maternal PRS and KON supplementation significantly reduced the number of stillborn piglets. Microbial sequencing analysis showed that PRS and KON increased short‐chain fatty acids (SCFAs)‐producing genera Bacteroides and Parabacteroides and decreased the abundance of endotoxin‐producing bacteria Desulfovibrio and Oscillibacter in feces. Moreover, the relative abundance of Turicibacter and the fecal butyrate concentration in PRS were the highest. Correlation analysis further revealed that the defecation frequency and serum 5‐HT were positively correlated with Turicibacter and butyrate. In conclusion, PRS is the best fiber source for promoting gut motility, which was associated with increased levels of 5‐HT under specific bacteria Turicibacter and butyrate stimulation, thereby relieving constipation. Our findings provide a reference for dietary fiber selection to improve intestinal motility in late pregnant mothers.