µ-Opioid peptide receptor (MOPR) stimulation alters respiration, analgesia and reward behaviour, and can induce substance abuse and overdose1–3. Despite its evident importance, the endogenous mechanisms for MOPR regulation of consummatory behaviour have remained unknown4. Here we report that endogenous MOPR regulation of reward consumption in mice acts through a specific dorsal raphe to nucleus accumbens projection. MOPR-mediated inhibition of raphe terminals is necessary and sufficient to determine consummatory response, while select enkephalin-containing nucleus accumbens ensembles are engaged prior to reward consumption, suggesting that local enkephalin release is the source of the endogenous MOPR ligand. Selective modulation of nucleus accumbens enkephalin neurons and CRISPR–Cas9-mediated disruption of enkephalin substantiate this finding. These results isolate a fundamental endogenous opioid circuit for state-dependent consumptive behaviour and suggest alternative mechanisms for opiate modulation of reward.