UV light is an established carcinogen, yet evidence suggests that UV-seeking behavior has addictive features. Following UV exposure, epidermal keratinocytes synthesize proopiomelanocortin (POMC) that is processed to melanocyte-stimulating hormone, inducing tanning. We show that, in rodents, another POMC-derived peptide, β-endorphin, is coordinately synthesized in skin, elevating plasma levels after low-dose UV. Increases in pain-related thresholds are observed and reversed by pharmacologic opioid antagonism. Opioid blockade also elicits withdrawal signs after chronic UV exposure.