Ischemic stroke has extremely high mortality and disability rates worldwide. miR-204-5p has been reported to be associated with neurological diseases. However, the relationship linking miR-204-5p to ischemic stroke and its molecular mechanism remain unclear. Herein, we found that expression of miR-204-5p was significantly decreased while EphA4 increased in vivo and vitro, which reached the peak at 24 h after cerebral ischemia/reperfusion. Then, we altered miR-204-5p expression in rats by cerebroventricular injection. Our study showed that miR-204-5p overexpression obviously reduced the brain infarction area and neurological score. We successfully cultured neurons to investigate the downstream mechanism. Upregulation of miR-204-5p increased cell viability and suppressed the release of LDH. Moreover, the proportion of apoptotic cells tested by TUNEL and flow cytometry and protein expression of Cleaved Caspase3 and Bax were inhibited. The relative expression of IL-6, TNF-α, and IL-1β was repressed. In contrary, knockdown of miR-204-5p showed the opposite results. Bioinformatics and a dual luciferase assay illustrated that EphA4 was a target gene. Further research studies demonstrated that the neuroprotective effects of miR-204-5p could be partially mitigated by upregulating EphA4. Next, we proved that the miR-204-5p/EphA4 axis furtherly activated the PI3K/AKT pathway. We thoroughly illustrated the role of neuroinflammation and apoptosis. However, whether there are other mechanisms associated with the EphA4/PI3K/AKT pathway needs further investigation. Altogether, the miR-204-5p axis ameliorates neurological injury via the EphA4/PI3K/AKT pathway, which is expected to serve as an effective treatment for ischemic stroke.