Neuronal loss is a hallmark of stroke and other neurodegenerative diseases, and as such, neuronal loss caused by microglia has been thought to be a contributing factor to disease progression. Here, we show that microglia indeed contribute significantly to neuronal loss in a mouse model of stroke, but this microglial-dependent process of neuronal clearance specifically targets stressed and degenerating neurons in the ischemic cortical region and not healthy non-ischemic neurons. Nonspecific stimulation of microglia decreased the density of neurons in the ischemic cortical region, whereas specific inhibition of MFG-E8 signaling, which is required for microglial phagocytosis of neurons, had the opposite effect. In both scenarios, the effects were microglia specific, as the same treatments had no effect in mice whose microglia were depleted prior to stroke. Finally, even though the inhibition of MFG-E8 signaling increased neuronal density in the ischemic brain region, it substantially exacerbated the development of cortical infarction. In conclusion, microglia through MFG-E8 signaling contribute to the loss of ischemic neurons and, in doing so, minimize the development of cortical infarction after stroke.