Acute myocardial infarction is a common condition responsible for heart failure and sudden death. Here, we show that following acute myocardial infarction in mice, CD8+ T lymphocytes are recruited and activated in the ischemic heart tissue and release Granzyme B, leading to cardiomyocyte apoptosis, adverse ventricular remodeling and deterioration of myocardial function. Depletion of CD8+ T lymphocytes decreases apoptosis within the ischemic myocardium, hampers inflammatory response, limits myocardial injury and improves heart function. These effects are recapitulated in mice with Granzyme B-deficient CD8+ T cells. The protective effect of CD8 depletion on heart function is confirmed by using a model of ischemia/reperfusion in pigs. Finally, we reveal that elevated circulating levels of GRANZYME B in patients with acute myocardial infarction predict increased risk of death at 1-year follow-up. Our work unravels a deleterious role of CD8+ T lymphocytes following acute ischemia, and suggests potential therapeutic strategies targeting pathogenic CD8+ T lymphocytes in the setting of acute myocardial infarction.