Nerve injury induces changes in gene transcription in dorsal root ganglion (DRG) neurons, which may contribute to nerve injury-induced neuropathic pain. DNA methylation represses gene expression. Here, we report that peripheral nerve injury increases expression of the DNA methyltransferase DNMT3a in the injured DRG neurons via the activation of the transcription factor octamer transcription factor 1. Blocking this increase prevents nerve injury-induced methylation of the voltage-dependent potassium (Kv) channel subunit Kcna2 promoter region and rescues Kcna2 expression in the injured DRG and attenuates neuropathic pain. Conversely, in the absence of nerve injury, mimicking this increase reduces the Kcna2 promoter activity, diminishes Kcna2 expression, decreases Kv current, increases excitability in DRG neurons and leads to spinal cord central sensitization and neuropathic pain symptoms. These findings suggest that DNMT3a may contribute to neuropathic pain by repressing Kcna2 expression in the DRG.