Pharmacological inhibition of reactive oxygen species (ROS) is a potential strategy to prevent diabetes-induced cardiac dysfunction. This study was designed to investigate precise effects of antioxidant N‑acetylcysteine (NAC) in alleviating diabetic cardiomyopathy (DCM). Echocardiography and histologic studies were performed 12 weeks after streptozocin injection. Protein levels involved in endoplasmic reticulum stress (ERS) and apoptosis were analyzed by western blotting in diabetic hearts or high-glucose (HG, 30 mM)- and palmitic acid (PA, 300 μM)-cultured neonatal rat cardiomyocytes (NRCMs). ROS generation and structural alterations of mitochondria were also assessed. We report that NAC alleviated diabetes-induced cardiac abnormality, including restored ejection fraction (EF %), fraction shortening (FS %), peak E to peak A ratio (E/A) and reduced cardiac hypertrophy and fibrosis. These effects were concomitant with blocked ERS and apoptosis, as evidenced by inactivation of phosphorylated inositol-requiring enzyme-1α (IRE1α)/spliced X-box binding protein 1 (XBP1), phosphorylated protein kinase-like kinase (PERK)/phosphorylated eukaryotic initiation factor 2α (eIF2α) and glucose-regulated protein 78 (GRP78)/activating transcription factor 6 (ATF6α)/C/EBP homologous protein (CHOP) pathways, as well as suppressed Bcl-2-associated X protein (BAX)/B-cell lymphoma-2 (Bcl-2) and cleaved caspase 3 expressions. Mechanistically, PA mediated excessive mitochondrial ROS generation and oxidative stress, which were antagonized by NAC and Mito-TEMPO, a mitochondrial ROS inhibitor. No effects were noted by addition of apocynin, a nicotinamide adenine dinucleotide phosphate (NADPH) oxidase inhibitor, and NADPH oxidase 4 (NOX 4) and NOX 2 expressions were not altered, indicating that PA-induced ROS generation is independent of NADPH oxidases. Most intriguingly, HG failed to promote ROS production despite its ability to promote ERS and apoptosis in NRCMs. Collectively, these findings indicate that NAC primarily abrogates PA-mediated mitochondrial ROS through ERS and therefore alleviates myocardial apoptosis but has little effect on HG-induced cardiac injury. This uncovers a potential role for NAC in formulating novel cardioprotective strategies in DCM patients.