PKM2 is a glycolytic pyruvate kinase isoenzyme, and its role in neurological diseases has been published. However, the role and mechanism of PKM2 in the process of status epilepticus have not been reported. The purpose of this study is to explore the role and mechanism of PKM2 in epilepsy. Quantitative real-time polymerase chain reaction (qRT-PCR) and western blotting were used to explore the expression of PKM2 in cells. Enzyme-linked immunosorbent assay kits were used to evaluate the level of inflammatory factors. An epilepsy model was established by intraperitoneal injection of lithium chloride in rats. Various behavioural assays were conducted to explore the learning ability and cognitive level of rats. PKM2 expression was upregulated in Mg2+-induced hippocampal neurons. PKM2 inhibition ameliorated Mg2+-induced hippocampal neuronal inflammation and reduced neuronal apoptosis. In addition, PKM2 silencing inhibited the metabolic dysfunction of Mg2+-induced hippocampal neurons. Subsequent experiments showed that the Akt/mTOR pathway and NLRP3 inflammasome are involved in PKM2-mediated neuronal regulation. More importantly, PKM2 inhibition could alleviate status epilepticus in rats. PKM2 inhibition attenuates Mg2+-induced hippocampal neuronal inflammation, apoptosis and metabolic dysfunction and improves the cognitive ability of rats. Therefore, PKM2 may be an important target for epilepsy treatment.