Microglia are the brain's primary innate immune cells, and they are activated and affect pro-inflammatory phenotype or regulatory phenotype after ischemic stroke. Vagus nerve stimulation was shown to activate microglial phenotypic changes and exhibit neuroprotective effects in ischemia/reperfusion injury. In this study, we established rat models of ischemic stroke by occlusion of the middle cerebral artery and performed vagus nerve stimulation 30 minutes after modeling. We found that vagus nerve stimulation caused a shift from a pro-inflammatory phenotype to a regulatory phenotype in microglia in the ischemic penumbra. Vagus nerve stimulation decreased the levels of pro-inflammatory phenotype markers inducible nitric oxide synthase and tumor necrosis factor α and increased the expression of regulatory phenotype markers arginase 1 and transforming growth factor β through activating α7 nicotinic acetylcholine receptor expression. Additionally, α7 nicotinic acetylcholine receptor blockade reduced the inhibition of Toll-like receptor 4/nuclear factor kappa-B pathway-associated proteins, including Toll-like receptor 4, myeloid differentiation factor 88, I kappa B alpha, and phosphorylated-I kappa B alpha, and also weakened the neuroprotective effects of vagus nerve stimulation in ischemic stroke. Vagus nerve stimulation inhibited Toll-like receptor 4/nuclear factor kappa-B expression through activating α7 nicotinic acetylcholine receptor and regulated microglial polarization after ischemic stroke, thereby playing a role in the treatment of ischemic stroke. Findings from this study confirm the mechanism underlying vagus nerve stimulation against ischemic stroke.