Myocardial infarction (MI) is characterized by massive cardiomyocytes death and cardiac dysfunction, and effective therapies to achieve cardioprotection are sorely needed. Here we reported that flavin containing monooxygenase 2 (FMO2) level was markedly increased in cardiomyocytes both in ex vivo and in vivo models of ischemia injury. Genetic deletion of FMO2 resulted in reduced cardiomyocyte survival and enhanced cardiac dysfunction, whereas cardiomyocyte-specific FMO2 overexpression exerted a protective effect in infarcted rat hearts. Mechanistically, FMO2 inhibited the activation of endoplasmic reticulum (ER) stress-induced apoptotic proteins, including caspase 12 and C/EBP homologous protein (CHOP), by down-regulating unfolded protein response (UPR) pathway. Furthermore, we identified FMO2 as a chaperone that catalyzed disulfide-bond formation in unfolded/misfolded proteins through its GVSG motif. GVSG-mutated FMO2 failed to catalyze disulfide-bond formation and lost its protection against ER stress and cardiomyocyte death. Finally, we demonstrated the protective effect of FMO2 in human induced pluripotent stem cell-derived cardiomyocyte (hiPSC-CM) model. Collectively, this study highlights FMO2 as a key modulator of oxidative protein folding in cardiomyocytes and underscores its therapeutic potential for treating ischemic heart disease.