Neuronal excitotoxicity induced by aberrant excitation of glutamatergic receptors contributes to brain damage in stroke. Here we show that tau-deficient (tau-/-) mice are profoundly protected from excitotoxic brain damage and neurological deficits following experimental stroke, using a middle cerebral artery occlusion with reperfusion model. Mechanistically, we show that this protection is due to site-specific inhibition of glutamate-induced and Ras/ERK-mediated toxicity by accumulation of Ras-inhibiting SynGAP1, which resides in a post-synaptic complex with tau. Accordingly, reducing SynGAP1 levels in tau-/- mice abolished the protection from pharmacologically induced excitotoxicity and middle cerebral artery occlusion-induced brain damage. Conversely, over-expression of SynGAP1 prevented excitotoxic ERK activation in wild-type neurons. Our findings suggest that tau mediates excitotoxic Ras/ERK signaling by controlling post-synaptic compartmentalization of SynGAP1.