Unmethylated CpG oligodeoxynucleotide (CpG-ODN), a Toll-like receptor 9 (TLR9) ligand, has been shown to protect against myocardial ischemia/reperfusion injury. However, the potential effects of CpG-ODN on myocardial infarction (MI) induced by persistent ischemia remains unclear. Here, we investigated whether and how CpG-ODN preconditioning protects against MI in mice. C57BL/6 mice were treated with CpG-ODN by i.p. injection 2 hr prior to MI induction, and cardiac function, and histology were analyzed 2 weeks after MI. Both 1826-CpG and KSK-CpG preconditioning significantly improved the left ventricular (LV) ejection fraction (LVEF) and LV fractional shortening (LVFS) when compared with non-CpG controls. Histological analysis further confirmed the cardioprotection of CpG-ODN preconditioning. In vitro studies further demonstrated that CpG-ODN preconditioning increases cardiomyocyte survival under hypoxic/ischemic conditions by enhancing stress tolerance through TLR9-mediated inhibition of the SERCA2/ATP and activation of AMPK pathways. Moreover, CpG-ODN preconditioning significantly increased angiogenesis in the infarcted myocardium compared with non-CpG. However, persistent TLR9 activation mediated by lentiviral infection failed to improve cardiac function after MI. Although CpG-ODN preconditioning increased angiogenesis in vitro, both the persistent stimulation of CpG-ODN and stable overexpression of TLR9 suppressed the tube formation of cardiac microvascular endothelial cells. CpG-ODN preconditioning significantly protects cardiac function against MI by suppressing the energy metabolism of cardiomyocytes and promoting angiogenesis. Our data also indicate that CpG-ODN preconditioning may be useful in MI therapy.