Caenorhabditis elegans (C. elegans) constitutes an important model organism for use in nutrition and aging studies. We report a novel method for studying the dynamics of Escherichia coli (E. coli) bacterial transit through the worms’ intestine. A microfluidic chip was designed for alternating C. elegans on-chip culture and immobilization, thereby enabling periodic high-resolution time-lapse imaging at single-worm resolution over several days. Immobilization was achieved in a reversible way using arrays of tapered channels suitable for assay parallelization. Dedicated C. elegans feeding protocols were applied. Two E. coli bacterial strains, HT115 and OP50, respectively labeled with green fluorescent protein (GFP) and red fluorescent protein (RFP), were used as food source and imaged with fluorescence microscopy techniques to measure relevant parameters of the bacterial transit process. Feeding behavior and E. coli transit dynamics in the whole intestinal tract of the worms were characterized in an automated way over the first 3 days of adulthood, revealing both fast transit phenomena and variations in microbial accumulation. In particular, we studied the bacterial food transit periodicity in wild-type and eat-2 (ad465) mutant C. elegans strains in both trapped and free-swimming conditions. In order to further demonstrate the versatility of our microfluidic platform, we also studied drug-induced modifications of the bacterial transit by measuring the response of the worms’ intestine to exposure to the neurotransmitter serotonin.