Caenorhabditis elegans (C. elegans) nematodes are a powerful model organism for diverse biological and biomedical studies, benefiting from their genetic similarities to humans, small size, and transparency. However, fluorescence imaging of C. elegans can be challenging due to the strong autofluorescence in the visible range, which obscures the signal of common fluorescent proteins or dyes. Single‐walled carbon nanotubes (SWCNTs) fluoresce in the near‐infrared (NIR) range, where there is no autofluorescence background. Herein, a platform is developed for in vivo NIR imaging of C. elegans gastrointestinal tract using biocompatible SWCNTs functionalized by single‐stranded DNA or phospholipid‐polyethylene glycol (PEG). The SWCNTs serve as fluorescent tracking probes within the worm gut, following internalization along with food intake. A microfluidic confinement device is employed to ensure an anesthetics‐free feeding environment, allowing spatiotemporal control over the SWCNTs intake imaging. Furthermore, improvements in spectral colocalization, real‐time detection of intracorporeal SWCNT dynamics, and digestive trajectory tracking are demonstrated. Owing to the unique optical properties of SWCNTs and the confinement of the worms in the microfluidics system, the proposed platform facilitates advanced in vivo imaging of C. elegans in both the visible and NIR regions, opening numerous avenues for advancing research of C. elegans and other microscopic model organisms.