After ischemic stroke, microglia rapidly respond to brain tissue injury, triggering acute inflammation and secondary tissue damage through the production of inflammatory mediators and the phagocytosis of neurons. Several days after ischemic stroke onset, microglia resolve inflammation by clearing damage-associated molecular patterns and necrotic tissue debris. Microglia also support neural repair and functional recovery after ischemic stroke by producing neurotrophic factors, promoting white matter repair and vascular remodeling. These reparative functions diminish within a few months after stroke onset due to epigenetic mechanisms that turn reparative microglia into dysfunctional ones. In this review, we discuss the time-dependent functional changes in microglia after ischemic stroke, from inflammatory activation to the acquisition and subsequent loss of reparative properties, together with the molecular mechanisms underlying these transitions.