Cross-talk between peripheral neurons and immune cells is important in pain sensation. We identified Snx25 as a pain-modulating gene in a transgenic mouse line with reduced pain sensitivity. Conditional deletion of Snx25 in monocytes and macrophages, but not in peripheral sensory neurons, in mice (Snx25 mice) reduced pain responses in both normal and neuropathic conditions. Bone marrow transplantation using Snx25 and wild-type mice indicated that macrophages modulated pain sensitivity. Expression of sorting nexin (SNX)25 in dermal macrophages enhanced expression of the neurotrophic factor NGF through the inhibition of ubiquitin-mediated degradation of Nrf2, a transcription factor that activates transcription of Ngf. As such, dermal macrophages set the threshold for pain sensitivity through the production and secretion of NGF into the dermis, and they may cooperate with dorsal root ganglion macrophages in pain perception.