d-tagatose, a monosaccharide as well as a dietary supplement, has been reported as having a wide range of applicability in the food industry, however, the prebiotic activity, anticonstipation effects, and related mechanisms are still unclear. In this study, using the loperamide-induced constipation Kunming mice as the animal model, the effects of d-tagatose for the prevention of constipation were evaluated by gastrointestinal transit experiment and defecation experiment. Furthermore, the underlying mechanism was clarified by evaluating the change of the biochemical indicators and analyzing 16S rRNA amplicon of gut microbiota among the different mice groups. The results showed that the gastrointestinal transit rate, fecal number, and weight in six hours were significantly enhanced after the administration of d-tagatose. In addition, d-tagatose significantly increased the serum levels of acetylcholine (Ach) and substance P (SP), whereas the serum levels of nitric oxide (NO) were significantly decreased. Moreover, the 16S rRNA sequencing analysis revealed that the changes in the gut microbiota caused by constipation were restored by d-tagatose treatment. In conclusion, this study indicated that the administration of d-tagatose as a dietary supplement can effectively prevent and relieve constipation in Kunming mice, and it is a promising prebiotic candidate with constipation-relieving properties.