PIEZO channels are force sensors essential for physiological processes including baroreception and proprioception. The Caenorhabditis elegans genome encodes an ortholog gene of the Piezo family, pezo-1, expressed in several tissues including the pharynx. This myogenic pump is an essential component of the C. elegans alimentary canal whose contraction and relaxation are modulated by mechanical stimulation elicited by food content. Whether pezo-1 encodes a mechanosensitive channel and contributes to pharyngeal function remains unknown. Here, we leverage genome editing, genetics, microfluidics, and electropharyngeogram recordings to establish that pezo-1 is expressed in the pharynx, including a proprioceptive-like neuron, and regulates pharyngeal function. Knockout (KO) and gain-of-function (GOF) mutants reveal that pezo-1 is involved in fine-tuning pharyngeal pumping frequency, sensing osmolarity, and food quality. Using pressure-clamp experiments in primary C. elegans embryo cultures, we determine that pezo-1 KO cells do not display mechanosensitive currents, whereas cells expressing wild-type or GOF PEZO-1 exhibit mechanosensitivity. Moreover, infecting the Spodoptera frugiperda cell line with a baculovirus containing the pezo-1 isoform G (among the longest isoforms) demonstrates that pezo-1 encodes a mechanosensitive channel. Our findings reveal that pezo-1 is a mechanosensitive ion channel that regulates food sensation in worms.