The gastrointestinal tract is in a state of constant motion. These movements are tightly regulated by the presence of food and help digestion by mechanically breaking down and propelling gut content. Mechanical sensing in the gut is thought to be essential for regulating motility; however, the identity of the neuronal populations, the molecules involved, and the functional consequences of this sensation are unknown. Here, we show that humans lacking PIEZO2 exhibit impaired bowel sensation and motility. Piezo2 in mouse dorsal root, but not nodose ganglia is required to sense gut content, and this activity slows down food transit rates in the stomach, small intestine, and colon. Indeed, Piezo2 is directly required to detect colon distension in vivo. Our study unveils the mechanosensory mechanisms that regulate the transit of luminal contents throughout the gut, which is a critical process to ensure proper digestion, nutrient absorption, and waste removal.