Mesenchymal stem cells (MSCs) are safe and effective in treating myocardial infarction (MI) and have broad application prospects. However, the heterogeneity of MSCs may affect their therapeutic effect on the disease. We recently found that MSCs derived from different segments of the same umbilical cord (UC) showed significant difference in the expression of genes that are related to heart development and injury repair. We therefore hypothesized that those MSCs with high expression of above genes are more effective to treat MI and tested it in this study. MSCs were isolated from 3cm-long segments of the maternal, middle and fetal segments of the UC (maternal-MSCs, middle-MSCs and fetal-MSCs, respectively). RNA-seq was used to analyze and compare the transcriptomes. We verified the effects of MSCs on oxygen-glucose deprivation (OGD)-induced cardiomyocyte apoptosis in vitro. In vivo, a rat MI model was established by ligating the left anterior descending coronary artery, and MSCs were injected into the myocardium surrounding the MI site. The therapeutic effects of MSCs derived from different segments of the UC were evaluated by examining cardiac function, histopathology, cardiomyocyte apoptosis, and angiogenesis. Compared to fetal-MSCs and middle-MSCs, maternal-MSCs exhibited significantly higher expression of genes that are associated with heart development, such as GATA-binding protein 4 (GATA4), and myocardin (MYOCD). Coculture with maternal-MSCs reduced OGD-induced cardiomyocyte apoptosis. In rats with MI, maternal-MSCs significantly restored cardiac contractile function and reduced the infarct size. Mechanistic experiments revealed that maternal-MSCs exerted cardioprotective effects by decreasing cardiomyocyte apoptosis, and promoting angiogenesis. Our data demonstrated that maternal segment-derived MSCs were a superior cell source for regenerative repair after MI. Segmental localization of the entire UC when isolating hUCMSCs was necessary to improve the effectiveness of clinical applications.