Endoplasmic reticulum (ER) stress, a disturbance of the ER function, contributes to cardiac injury. ER and mitochondria are closely connected organelles within cells. ER stress contributes to mitochondrial dysfunction, which is a key factor to increase cardiac injury. Metformin, a traditional anti-diabetic drug, decreases cardiac injury during ischemia-reperfusion. Metformin also inhibits ER stress in cultured cells. We hypothesized that metformin can attenuate the ER stress–induced mitochondrial dysfunction and subsequent cardiac injury. Thapsigargin (THAP, 3 mg/kg) was used to induce ER stress in C57BL/6 mice. Cell injury and mitochondrial function were evaluated in the mouse heart 48 hours after 1-time THAP treatment. Metformin was dissolved in drinking water (0.5 g/250 ml) and fed to mice for 7 days before THAP injection. Metformin feeding continued after THAP treatment. THAP treatment increased apoptosis in mouse myocardium compared to control. THAP also led to decreased oxidative phosphorylation in heart mitochondria–oxidizing complex I substrates. THAP decreased the calcium retention capacity, indicating that ER stress sensitizes mitochondria to mitochondrial permeability transition pore opening. The cytosolic C/EBP homologous protein (CHOP) content was markedly increased in THAP-treated hearts compared to control, particularly in the nucleus. Metformin prevented the THAP-induced mitochondrial dysfunction and reduced CHOP content in cytosol and nucleus. Thus, metformin reduces cardiac injury during ER stress through the protection of cardiac mitochondria and attenuation of CHOP expression.