Background. Arrhythmia after myocardial infarction is the leading cause of death in clinical heart disease. Increasing studies have shown that the response to endoplasmic reticulum (ER) stress (ERS) caused by myocardial infarction is related to prognosis and the development of arrhythmias. The unfolded protein response (UPR) could serve as an important regulatory signaling pathway following myocardial infarction. The traditional Chinese medicine Wenxin Granules improve arrhythmias following myocardial infarction, which may be related to ERS intervention and the activation of the UPR and apoptosis. We aimed to investigate the involvement of Wenxin Granules in the activation of the UPR and apoptosis following myocardial infarction. Left coronary artery ligation was established as a rat model of myocardial infarction. The rats were randomly divided into the model group, low-dose Wenxin Granule group, high-dose Wenxin Granule group, and metoprolol group. Rats with only wire insertion and no ligature were used as the sham group. Small animal ultrasound systems were used to detect changes in heart structure and function, and the electrical stimulation threshold for ventricular fibrillation was detected. The expression of glucose-regulated protein (GRP)78, activating transcription factor (ATF)6, X-box binding protein (XBP)1, protein kinase–like ER kinase (PERK), phosphorylated (p)-PERK, Bax, Bcl2, C/EBP homologous protein (CHOP), caspase 12, caspase 8, and caspase 3 were detected by western blot, and terminal deoxynucleotidyl transferase dUTP Nick end labeling (TUNEL) was used to determine the cardiomyocyte apoptosis index. Compared with the sham group, rats in the model group displayed immediate ST-segment elevation and pathological Q waves after 24 hours. After 2 weeks, the left ventricular (LV) anterior wall thickness (LVAW) became thinner, and the inner diameter (LVID) increased. The end-diastolic LVAW (LVAWd), end-systolic LVAW (LVAWs), ejection fraction (EF), and fractional shortening (FS) were significantly reduced (P < 0.01), whereas the LVIDd, LVIDs, diastolic LV volume (LV Vold), and systolic LV volume (LV Vols) significantly increased (P < 0.01). The ventricular fibrillation threshold decreased significantly (P < 0.01). ERS proteins GRP78, p-PERK, PERK, ATF6, and XBP1 and apoptotic proteins CHOP, Bax, caspase 12, caspase 8, and caspase 3 significantly increased (P < 0.01, P < 0.05), whereas Bcl-2 expression and the Bcl-2/Bax ratio decreased (P < 0.01). Compared with the sham group, LVAWd, LVAWs, FS, and Bcl-2 protein expression were significantly increased in the low-dose Wenxin Granule group (P < 0.01, P < 0.05), and p-PERK and ATF6 decreased (P < 0.01, P < 0.05). Compared with the sham group, LVAWd, LVAWs, EF, FS, and the ventricular fibrillation threshold significantly increased in the high-dose Wenxin Granule and metoprolol groups (P < 0.01, P < 0.05), whereas LVIDs, LV Vols, and ERS proteins were significantly decreased (P < 0.01, P < 0.05). CHOP, Bax, caspase 12, caspase 8, and caspase 3 protein expression decreased in the Wenxin Granule group (P < 0.01, P < 0.05), whereas Bcl-2 and the Bcl-2/Bax ratio increased (P < 0.01, P < 0.05). LVIDd and Bax decreased in the metoprolol group (P < 0.01, P < 0.05), and the Bcl-2/Bax ratio increased (P < 0.05). The cardiomyocyte apoptosis index values for the low- and high-dose Wenxin Granule and metoprolol groups were significantly reduced (P < 0.05). This study suggested that the UPR is an essential mechanism underlying pathological injury after myocardial infarction. Wenxin Granule treatment can improve ventricular remodeling and cardiac function and inhibit arrhythmia by preventing excessive ERS from activating the UPR and apoptosis.