Background. Myocardial infarction (MI) is an acute and serious cardiovascular disease. Arrhythmia after MI can lead to sudden cardiac death, which seriously affects the survival outcome of patients. WenXin KeLi is a Chinese patent medicine for the treatment of arrhythmia in a clinic, which can significantly improve symptoms of palpitation and play an important role in reducing the risk of arrhythmia after MI. In this study, we aimed to explore the pharmacological mechanism of WenXin KeLi in protecting the heart. Methods. The MI model was established by ligating the left coronary artery and the ventricular fibrillation threshold (VFT) was measured by electrical stimulation. The expression of connexin43 (CX43) and autophagy-related protein were measured by Western Blot, and correlation analysis was conducted to study the relationship between cardiac autophagy, CX43, and arrhythmia in rats after MI. The effects of WenXin KeLi on arrhythmia, cardiac structure, and function in MI rats were respectively observed by electrical stimulation, cardiac gross section, Masson staining, and cardiac ultrasound. The effects of WenXin KeLi on the expression of phosphoinositide 3 kinase-protein kinase B-mammalian targets of rapamycin (PI3K-AKT-mTOR) autophagy pathway and CX43 were observed by Western Blot. Results. After 4 weeks of MI, the VFT in the model group was significantly reduced, the expression levels of yeast ATG6 homolog (Beclin1), microtubule-associated protein 1A/1B-light chain 3 (LC3II/LC3I), and p-CX43 (S368) significantly increased, the expression of sequestosome-1(P62) and CX43 significantly decreased. LC3II/LC3I and Beclin1 expression were significantly negatively correlated with the VFT, and the expression of P62 and CX43 were significantly positively correlated with the VFT. LC3II/LC3I and Beclin1 expression were negatively correlated with CX43 expression, while P62 expression was positively correlated with CX43 expression. WenXin KeLi could significantly increase the VFT, reduce the deposition of collagen fibers, and increase the index levels of the left ventricular end-diastolic anterior wall (LVEDAW), interventricular septum end-diastolic (IVSED), left ventricular end-systolic anterior wall (LVESAW), interventricular septum end-systolic (IVSES), left ventricular end-diastolic posterior wall (LVEDPW), left ventricular end-systolic posterior wall (LVESPW), left ventricular ejection fraction (LVEF) and left ventricular fractional shortening (LVFS), and reduce the index levels of the left ventricular end-diastolic dimension (LVEDD), left ventricular end-systolic dimension (LVESD), left ventricular end-diastolic volume (LVEDV) and left ventricular end-systolic volume (LVESV). WenXin KeLi could increase the expression of CX43, P62, AKT, p-PI3K, p-AKT (308), p-AKT (473), and p-mTOR and decrease the expression of LC3II/LC3I and Beclin1. Conclusion. WenXin KeLi can activate the PI3K-AKT-mTOR signaling pathway, improve cardiac autophagy and Cx43 expression in rats after MI, reduce the risk of arrhythmia after MI, and play a cardioprotective role.