Here, we show that microglial P2Y12-mediated responses are essential for the recognition and effective elimination of compromised neurons after virus infection that reaches the brain exclusively via retrograde transsynaptic spread. This evidence concerns the gene P2RY12 and viral infectious disease.