The ability of cannabis to increase food consumption has been known for centuries. In addition to producing hyperphagia, cannabinoids can amplify existing preferences for calorically dense, palatable food sources, a phenomenon called hedonic amplification of feeding. These effects result from the action of plant-derived cannabinoids that mimic endogenous ligands called endocannabinoids. The high degree of conservation of cannabinoid signaling at the molecular level across the animal kingdom suggests hedonic feeding may also be widely conserved. Here, we show that exposure of Caenorhabditis elegans to anandamide, an endocannabinoid common to nematodes and mammals, shifts both appetitive and consummatory responses toward nutritionally superior food, an effect analogous to hedonic feeding. We find that anandamide's effect on feeding requires the C.elegans cannabinoid receptor NPR-19 but can also be mediated by the human CB1 cannabinoid receptor, indicating functional conservation between the nematode and mammalian endocannabinoid systems for the regulation of food preferences. Furthermore, anandamide has reciprocal effects on appetitive and consummatory responses to food, increasing and decreasing responses to inferior and superior foods, respectively. Anandamide's behavioral effects require the AWC chemosensory neurons, and anandamide renders these neurons more sensitive to superior foods and less sensitive to inferior foods, mirroring the reciprocal effects seen at the behavioral level. Our findings reveal a surprising degree of functional conservation in the effects of endocannabinoids on hedonic feeding across species and establish a new system to investigate the cellular and molecular basis of endocannabinoid system function in the regulation of food choice.