Cardiovascular complications are highly prevalent in patients with diabetes. Zhi-Gan-Cao-Tang (ZGCT), a famous traditional Chinese medicine (TCM) prescription, can be used for the treatment of diabetes with cardiovascular disease complications. ZGCT is composed of nine Chinese herbs: the radix and rhizoma of Glycyrrhiza uralensis Fisch. (Gancao in Chinese, 12g), the radix of Rehmannia glutinosa Libosch. (Dihuang in Chinese, 50g), the radix and rhizoma of Panax ginseng C. A. Mey. (Renshen in Chinese, 6g), the radix of Ophiopogon japonicus (L. f.) Ker-Gawl. (Maidong in Chinese, 10g), the fructus of Ziziphus jujuba Mill. (Dazao in Chinese, 18g), the fructus of Cannabis sativa L. (Maren in Chinese, 10g), Donkey-hide gelatine (Ejiao in Chinese, 6g), the ramulus of Cinnamomum cassia Presl (Guizhi in Chinese, 9g), and the fresh rhizoma of Zingiber officinale Rosc. (Shengjiang in Chinese, 9g). Many of these Chinese herbs are also used in other systems of medicine (Japan, India, European, etc.). However, the effects and effective constituents of ZGCT against diabetic cardiovascular disease remain unclear. This study aimed to investigate the protective effect of ZGCT against diabetic myocardial infarction (DMI) injury in vivo and in vitro and to identify the effective constituents of ZGCT. The in vivo effect on DMI injury was evaluated in a DMI mouse model. The in vitro effect and effective constituent screening experiments were conducted in an H9c2 cardiomyocyte injury model induced by high glucose and hypoxia. It was found that ZGCT significantly reduced myocardial infarction size and serum lactate dehydrogenase (LDH) levels in DMI mice. Myocardial histopathological experiments showed that ZGCT alleviated the disordered arrangement and fracture of muscle fibers and cell disappearance and reduced inflammatory cell infiltration. Cellular experiments showed that ZGCT inhibited cardiomyocyte apoptosis by decreasing the expression of the proapoptotic factor Bax. In addition, it inhibited inflammatory reactions by suppressing the activation of the IκBα/NF-κB pathway and the expression of iNOS. Eight constituents from six Chinese herbs in the recipe of ZGCT were found to enhance the viability of injured cardiomyocytes, and six effective constituents played protective roles through anti-apoptotic and/or anti-inflammatory activities. In addition, one of the effective constituents, glycyrrhizic acid, was verified in vivo to have cardioprotective effect on DMI mice. The TCM prescription ZGCT protects against DMI by inhibiting cardiomyocyte apoptosis and reducing inflammatory reactions. Eight effective constituents of ZGCT were identified. This study provides a scientific basis for the clinical application of ZGCT and is valuable for quality marker research on this prescription.