Stroke ranks second as a leading cause of death and permanent disability globally. Microglia, innate immune cells in the brain, respond rapidly to ischemic injury, triggering a robust and persistent neuroinflammatory reaction throughout the disease’s progression. Neuroinflammation plays a critical role in the mechanism of secondary injury in ischemic stroke and is a significant controllable factor. Microglia activation takes on two general phenotypes: the pro-inflammatory M1 type and the anti-inflammatory M2 type, although the reality is more complex. The regulation of microglia phenotype is crucial to controlling the neuroinflammatory response. This review summarized the key molecules and mechanisms of microglia polarization, function, and phenotypic transformation following cerebral ischemia, with a focus on the influence of autophagy on microglia polarization. The goal is to provide a reference for the development of new targets for the treatment for ischemic stroke treatment based on the regulation of microglia polarization.