Aim We tested the hypothesis that fecal microbiota transplantation (FMT) could regulate the biotransformation of bile acids, such as deoxycholic acid (DCA) and cholic acid (CA), which in turn regulate the biosynthesis of serotonin in the gut and relieve gastrointestinal dysmotility in high-fat diet- (HFD-) induced obesity in rats. Methods Male Sprague-Dawley rats were randomly divided into the control diet group, HFD group, and HFD-fed with receiving FMT. HFD was fed for 12 weeks. At the end of two-week HFD, FMT was carried out for two weeks. The gastrointestinal transit, serotonin concentration, the expression of tryptophan hydroxylase 1 (TPH1) and serotonin reuptake transporter (SERT), and the levels of bile acids in intestinal contents were examined. Results Compared with the control group, the gastrointestinal transit and small intestinal serotonin concentration of HFD-fed rats were increased. In HFD-fed rats, TPH1 protein expression was increased significantly, while SERT protein expression was decreased, but not significant. The levels of CA and DCA in intestinal contents were also significantly increased in HFD-fed rats compared with the control group. After HFD-fed rats receiving FMT treatment, the gastrointestinal transit, small intestinal serotonin concentration, and TPH1 expression were decreased, while SERT expression was not affected. Moreover, the levels of CA and DCA in intestinal contents were also decreased. Conclusions FMT could alleviate small intestinal transit in the HFD-fed rats by regulating the serotonin biosynthesis. In this process, CA and DCA may be related to the regulation of synthesis of serotonin.