This study aimed to investigate the potential of electroacupuncture as an intervention for inducing ‘Awakening and Opening of the Brain’ in rats with stroke models induced by middle cerebral artery occlusion/reperfusion (MCAO/R). The efficacy of electroacupuncture in alleviating cerebral ischemic injury was evaluated using Longa scores, triphenyl tetrazolium chloride staining, and hematoxylin and eosin staining. Non-targeted metabolomics analysis was conducted to identify differential metabolite changes before and after electroacupuncture treatment in MCAO/R rats. Network pharmacology analysis was then performed to correlate these differential metabolites with ischemic stroke. The PI3K/AKT/NF-κB signaling pathway was identified as a key target. In vivo experiments further validated the mechanism by which electroacupuncture promotes M2 microglial polarization through inhibition of the PI3K/AKT/NF-κB signaling in MCAO/R rats. This study demonstrated that electroacupuncture reduces brain damage and inhibits inflammation in MCAO/R rats by modulating the PI3K/AKT/NF-κB signaling pathway and promoting the polarization of microglia from M1 to M2.