Tanshinone IIA (TanIIA) has neuroprotective effects against cerebral ischemia reperfusion injury (CIRI), but its clinical application is limited due to poor water solubility and robust first pass elimination property. In this study, we developed microemulsion loaded with TanIIA (TanIIA ME) to break through these limitations, and explored the neuroprotective effect of TanIIA ME against CIRI and the epigenetic regulation mechanism of this neuroprotection. In vivo, middle cerebral artery occlusion (MCAO) models were treated with TanIIA ME and TanIIA solution or sodium valproate as a control. The effect of TanIIA ME on HDAC activity was determined by ELISA assay. In addition, we used primary hippocampal neurons to establish oxygen-glucose deprivation and reoxygenation (OGD/R) models. Lactate dehydrogenase (LDH) assay and terminal deoxynucleotidyl transferase dUTP nick end labeling (TUNEL) assay were performed to investigate the neuroprotective efficacy of TanIIA ME. Subsequently, the expression of H3K18ac, H4K8ac, NMDAR1, caspase-3, and MAP-2 were investigated in MCAO or OGD/R models treated with TanIIA ME, TanIIA solution or sodium valproate. In vivo experimental results indicated that TanIIA ME significantly reduced neurological scores, infarction volume, and HDAC activity compared with TanIIA solution and MCAO group, accompanied by upregulation of H3K18ac, H4K8ac, and MAP-2 expression and downregulation of NMDAR1 and caspase-3 expression. Additionally, in OGD/R models, the results demonstrated that TanIIA ME treatment had a better neuroprotective effect along with increased H3K18ac, H4K8ac, and MAP-2 expression and decreased NMDAR1 and caspase-3 expression, compared with the other treatments except sodium valproate. Overall, TanIIA ME treatment exhibited superior efficacy in protecting against CIRI through mechanisms that might involve the inhibition of NMDAR1 and caspase-3 expression and the enhancement of MAP-2 expression by regulating histone H3K18 and H4K8 acetylation. Thus, TanIIA ME could be potentially used to develop a promising drug for the treatment of ischemic stroke.