Substance P (SP) is an undecapeptide present in the CNS and the peripheral nervous system. A compound thought to be involved in the synaptic transmission of pain and other nerve impulses.
Per UWorld; capsaicin found in chili peppers causes excessive activation of TRPV1 (transmembrane channel), which increases intracellular calcium that results in long-lasting dysfunction of nociceptive nerve fibers (defunctionalization). It also causes release and depletion of Substance P, causing at first burning and erythema but over time causes decreased pain sensation.
Capsaicin induces the release of substance P, one of the principal chemo-mediators of pain impulses from the periphery to the central nervous system (CNS). After repeated application, capsaicin depletes the neuron of substance P and prevents its reaccumulation.