Background: Cerebral ischemia, a common cerebrovascular disease, is one of the great threats to human health and new targets for stroke therapy are needed. The transcriptional activity in the cell is regulated by epigenetic processes such as DNA methylation/demethylation, acetylation/deacetylation, histone methylation, etc. Changes in DNA methylation after ischemia can have both neuroprotective and neurotoxic effects depending on the degree of ischemia damage, the time elapsed after injury, and the site of methylation. Methods: In this study, we investigated the changes in the expression and intracellular localization of DNA methyltransferase DNMT1, histone methyltransferases SUV39H1, and G9a in penumbra neurons and astrocytes at 4 and 24 h after stroke in the rat cerebral cortex using photothrombotic stroke (PTS) model. Methods of immunofluorescence microscopy analysis, apoptosis analysis, and immunoblotting were used. Additionally, we have studied the effect of DNMT1 and G9a inhibitors on the volume of PTS-induced infarction and apoptosis of penumbra cells in the cortex of mice after PTS. Results: This study has shown that the level of DNMT1 increased in the nuclear and cytoplasmic fractions of the penumbra tissue at 24 h after PTS. Inhibition of DNMT1 by 5-aza-2′-deoxycytidine protected cells of PTS-induced penumbra from apoptosis. An increase in the level of SUV39H1 in the penumbra was found at 24 h after PTS and G9a was overexpressed at 4 and 24 h after PTS. G9a inhibitors A-366 and BIX01294 protected penumbra cells from apoptosis and reduced the volume of PTS-induced cerebral infarction. Conclusion: Thus, the data obtained show that DNA methyltransferase DNMT1 and histone methyltransferase G9a can be potential protein targets in ischemic penumbra cells, and their inhibitors are potential neuroprotective agents capable of protecting penumbra cells from postischemic damage to the cerebral cortex.