Endothelin-1 (ET-1) is a newly described pain mediator that is involved in the pathogenesis of pain states ranging from trauma to cancer. ET-1 is synthesized by keratinocytes in normal skin and is locally released after cutaneous injury. While it is able to trigger pain through its actions on endothelin-A (ET(A)) receptors of local nociceptors, it can coincidentally produce analgesia through endothelin-B (ET(B)) receptors. Here we map a new endogenous analgesic circuit, in which ET(B) receptor activation induces the release of beta-endorphin from keratinocytes and the activation of G-protein-coupled inwardly rectifying potassium channels (GIRKs, also named Kir-3) linked to opioid receptors on nociceptors. These results indicate the existence of an intrinsic feedback mechanism to control peripheral pain in skin, and establish keratinocytes as an ET(B) receptor-operated opioid pool.