Functional intestinal imaging holds importance for the diagnosis and evaluation of treatment of gastrointestinal diseases. Currently, preclinical imaging of intestinal motility in animal models is performed either invasively with excised intestines or noninvasively under anesthesia, and cannot reveal intestinal dynamics in the awake condition. Capitalizing on near-infrared optics and a high-absorbing contrast agent, we report the Trans-illumination Intestine Projection (TIP) imaging system for free-moving mice. After a complete system evaluation, we performed in vivo studies, and obtained peristalsis and segmentation motor patterns of free-moving mice. We show the in vivo typical segmentation motor pattern, that was previously shown in ex vivo studies to be controlled by intestinal pacemaker cells. We also show the effects of anesthesia on motor patterns, highlighting the possibility to study the role of the extrinsic nervous system in controlling motor patterns, which requires unanesthetized live animals. Combining with light-field technologies, we further demonstrated 3D imaging of intestine in vivo (3D-TIP). Importantly, the added depth information allows us to extract intestines located away from the abdominal wall, and to quantify intestinal motor patterns along different directions. The TIP system should open up avenues for functional imaging of the GI tract in conscious animals in natural physiological states.