Myocardial fibrosis (MF) is a major cause of morbidity and mortality worldwide. Qili Qiangxin capsule (QLQX) is a traditional Chinese medicine (TCM) formula used for treating MF, QLQX can affect ventricular remodeling by regulating collagen deposition; however, the specific mechanism by which QLQX modulates collagen homeostasis remains unclear. Thus, this study aimed to explore the effect of QLQX on collagen fibers and its mechanism of action in rats after myocardial infarction (MI). Rats were subjected to left anterior descending artery ligation and then were divided equally into five groups: sham, model, low-dose QLQX, high-dose QLQX and empagliflozin groups. QLQX treatment for 28 days significantly improved cardiac function, as evidenced by decreases in heart mass index, cardiac volume, left ventricular end-diastolic diameter, left ventricular end-systolic diameter, N-terminal B-type natriuretic peptide levels, and high-sensitivity cardiac troponin I levels and increases in left ventricular ejection fraction and left ventricular fraction shortening. Hematoxylin and eosin, Masson, and Picrosirius red staining under a light microscope indicated that QLQX treatment suppressed fibrosis and promoted angiogenesis by decreasing the protein expression levels of proteins related to cardiac remodeling including transforming growth factor-β1, metalloproteinase-9 and α-smooth muscle actin and increasing the expression of tissue inhibitor of matrix metalloproteinase-1 concentration. Picrosirius red staining under the polarized light microscope and western blotting showed that MI increased the contents of collagen I and III, and reduced the contents of collagen II and IV. QLQX treatment improved cardiac function and attenuated MF by modulating collagen homeostasis and promoting angiogenesis. This study provides novel insights into the mechanism of action of QLQX in preventing MF after MI.