In response to neuronal injury or disease, microglia adopt distinct reactive phenotypes via the expression of different sets of genes. Spinal microglia expressing the purinergic P2X4 receptor (P2X4R) after peripheral nerve injury (PNI) are implicated in neuropathic pain. Here we show that interferon regulatory factor-5 (IRF5), which is induced in spinal microglia after PNI, is responsible for direct transcriptional control of P2X4R. Upon stimulation of microglia by fibronectin, IRF5 induced de novo expression of P2X4R by directly binding to the promoter region of the P2rx4 gene. Mice lacking Irf5 did not upregulate spinal P2X4R after PNI, and also exhibited substantial resistance to pain hypersensitivity. Furthermore, we found that expression of IRF5 in microglia is regulated by IRF8. Thus, an IRF8-IRF5 transcriptional axis may contribute to shifting spinal microglia toward a P2X4R-expressing reactive state after PNI. These results may provide a new target for treating neuropathic pain.