Acute inflammation in humans or mice enhances the analgesic properties of opioids. However, the inflammatory transducers that prime opioid receptor signaling in nociceptors are unknown. We found that TRPV1−/− mice are insensitive to peripheral opioid analgesia in an inflammatory pain model. We report that TRPV1 channel activation drives a MAPK signaling pathway accompanied by the shuttling of β-arrestin2 to the nucleus. This shuttling in turn prevents: β-arrestin2-receptor recruitment, subsequent internalization of agonist-bound mu opioid receptor (MOR), and suppression of DAMGO-induced inhibition of N-type calcium current observed upon desensitization. Consequently, inflammation-induced activation of TRPV1 preserves opioid analgesic potency in a mouse model of opioid receptor desensitization. Overall, our work reveals a TRPV1-mediated signaling mechanism, involving β-arrestin2 nuclear translocation, that underlies the peripheral opioid control of inflammatory pain. Our data single out TRPV1 channels as modulators of opioid analgesia.