We previously reported that activation of the cell cycle in human-induced pluripotent stem cell-derived cardiomyocytes (hiPSC-CMs) enhances their remuscularization capacity after human cardiac muscle patch transplantation in infarcted mouse hearts. Herein, we sought to identify the effect of magnesium lithospermate B (MLB) on hiPSC-CMs during myocardial repair using a myocardial infarction (MI) mouse model. In C57BL/6 mice, MI was surgically induced by ligating the left anterior descending coronary artery. The mice were randomly divided into five groups ( n = 10 per group); a MI group (treated with phosphate-buffered saline only), a hiPSC-CMs group, a MLB group, a hiPSC-CMs + MLB group, and a Sham operation group. Cardiac function and MLB therapeutic efficacy were evaluated by echocardiography and histochemical staining 4 weeks after surgery. To identify the associated mechanism, nuclear factor (NF)-κB p65 and intercellular cell adhesion molecule-1 (ICAM1) signals, cell adhesion ability, generation of reactive oxygen species, and rates of apoptosis were detected in human umbilical vein endothelial cells (HUVECs) and hiPSC-CMs. After 4 weeks of transplantation, the number of cells that engrafted in the hiPSC-CMs + MLB group was about five times higher than those in the hiPSC-CMs group. Additionally, MLB treatment significantly reduced tohoku hospital pediatrics-1 (THP-1) cell adhesion, ICAM1 expression, NF-κB nuclear translocation, reactive oxygen species production, NF-κB p65 phosphorylation, and cell apoptosis in HUVECs cultured under hypoxia. Similarly, treatment with MLB significantly inhibited the apoptosis of hiPSC-CMs via enhancing signal transducer and activator of transcription 3 (STAT3) phosphorylation and B-cell lymphoma-2 (BCL2) expression, promoting STAT3 nuclear translocation, and downregulating BCL2-Associated X, dual specificity phosphatase 2 (DUSP2), and cleaved-caspase-3 expression under hypoxia. Furthermore, MLB significantly suppressed the production of malondialdehyde and lactate dehydrogenase and the reduction in glutathione content induced by hypoxia in both HUVECs and hiPSC-CMs in vitro . MLB significantly enhanced the potential of hiPSC-CMs in repairing injured myocardium by improving endothelial cell function via the NF-κB/ICAM1 pathway and inhibiting hiPSC-CMs apoptosis via the DUSP2/STAT3 pathway.