To investigate the role of DNA methylation in modulating chronic neuropathic pain (NPP), identify possible target genes of DNA methylation involved in this process, and preliminarily confirm the medicinal value of the DNA methyltransferases (DNMTs) inhibitor 5-azacytidine (5-AZA) in NPP by targeting gene methylation. Two rat NPP models, chronic constriction injury (CCI) and spinal nerve ligation (SNL), were used. The DNA methylation profiles in the lumbar spinal cord were assayed using an Arraystar Rat RefSeq Promoter Array. The underlying genes with differential methylation were then identified and submitted to Gene Ontology and pathway analysis. Methyl-DNA immunoprecipitation quantitative PCR (MeDIP-qPCR) and quantitative reverse transcription-PCR (RT-qPCR) were used to confirm gene methylation and expression. The protective function of 5-AZA in NPP and gene expression were evaluated via behavioral assays and RT-qPCR, respectively. Analysis of the DNA methylation patterns in the lumbar spinal cord indicated that 1205 differentially methylated fragments in CCI rats were located within DNA promoter regions, including 638 hypermethylated fragments and 567 hypomethylated fragments. The methylation levels of Grm4, Htr4, Adrb2, Kcnf1, Gad2, and Pparg, which are associated with long-term potentiation (LTP) and glutamatergic synapse pathways, were increased with a corresponding decrease in their mRNA expression, in the spinal cords of CCI rats. Moreover, we found that the intraperitoneal injection of 5-AZA (4mg/kg) attenuated CCI- or SNL-induced mechanical allodynia and thermal hyperalgesia. Finally, the mRNA expression of hypermethylated genes such as Grm4, Htr4, Adrb2, Kcnf1, and Gad2 was reversed after 5-AZA treatment. CCI induced widespread methylation changes in the DNA promoter regions in the lumbar spinal cord. Intraperitoneal 5-AZA alleviated hyperalgesia in CCI and SNL rats, an effect accompanied by the reversed expression of hypermethylated genes. Thus, DNA methylation inhibition represents a promising epigenetic strategy for protection against chronic NPP following nerve injury. Our study lays a theoretical foundation for 5-AZA to become a clinical targeted drug.