Microbial conversion of dietary or drug substrates into small bioactive molecules represents a regulatory mechanism by which the gut microbiota alters intestinal physiology. Here, we show that a wide variety of gut bacteria can metabolize the dietary supplement and antidepressant 5-hydroxytryptophan (5-HTP) to 5-hydroxyindole (5-HI) via the tryptophanase (TnaA) enzyme. Oral administration of 5-HTP results in detection of 5-HI in fecal samples of healthy volunteers with interindividual variation. The production of 5-HI is inhibited upon pH reduction in in vitro studies. When administered orally in rats, 5-HI significantly accelerates the total gut transit time (TGTT). Deciphering the underlying mechanisms of action reveals that 5-HI accelerates gut contractility via activation of L-type calcium channels located on the colonic smooth muscle cells. Moreover, 5-HI stimulation of a cell line model of intestinal enterochromaffin cells results in significant increase in serotonin production. Together, our findings support a role for bacterial metabolism in altering gut motility and lay the foundation for microbiota-targeted interventions.