Hypoxic-ischemic encephalopathy (HIE) is one main cause of neonatal death and disability, causing substantial injury to white and gray matter, which can lead to severe neurobehavioral dysfunction, including intellectual disability and dyskinesia. Inflammation, nerve cell death, and white matter injury are important factors in the pathological process of HIE. 6-Gingerol is a ginger extract, which reduces inflammatory response and cell death. However, the role of 6-Gingerol in neonatal hypoxic-ischemic brain injury (HIBI) remains unknown. In this study, we constructed a mouse HIBI model and analyzed the protective effect of 6-Gingerol on HIBI by using behavioral tests, histological staining, qPCR and western blot. Here, we found that 6-Gingerol treatment could alleviate HIBI and improve short-term reflex performance, which is closely related to cell death and neuroinflammation. Additionally, 6-Gingerol reduced neuronal apoptosis, pro-inflammatory factor release, as well as microglial activation. Furthermore, 6-Gingerol significantly improved motor disability, which is associated with white matter damage. Thus, our results showed that 6-Gingerol could reduce the loss of myelin sheaths, alleviate cell death of oligodendrocytes, and stimulate the maturation of oligodendrocytes. In terms of mechanism, we found that 6-Gingerol decreased histone H3K27me3 levels, activated AKT pathway and inhibited the activation of ERK and NF-κB pathway at 3 days post-HIBI. Taken together, our data clearly indicate that 6-Gingerol plays a neuroprotective role against HIBI by epigenetic modification and regulation of AKT, ERK, and NF-κB pathways, inhibiting inflammatory responses and reducing cell death.