Abstract Background Salvianolate, derived from Salvia miltiorrhiza Bunge, is a traditional Chinese medicine known for its potential to promote blood circulation and eliminate blood stasis, often prescribed for cardiovascular system illnesses. This study aims to explore the impact of salvianolate treatment on the prognosis of patients with myocardial infarction during hospitalization. Methods This study included an acute myocardial infarction cohort from 71 secondary or tertiary hospitals between January 1, 2010 and June 30, 2023. Patients were divided into NSTEMI and STEMI groups. Clinical outcomes included cardiac death and major adverse cardiovascular and cerebrovascular events (MACCE, composite of cardiac death, myocardial infarction, ischemic stroke) within 30 days. Cox multivariable regression analyzed the association between salvianolate use and outcomes in STEMI/NSTEMI patients. Propensity score matching (PSM) adjusted for demographic and clinical differences between salvianolate and non-salvianolate groups. The matching factors including sex, age, Killip class, previous diseases (diabetes, hypertension, stroke, and renal insufficiency), previous percutaneous coronary intervention (PCI), in-hospital aspirin, clopidogrel, ticagrelor, lipid-lowering agents, nitrates, PCI, and thrombolytic therapy. Results A total of 76,157 STEMI patients and 74,373 NSTEMI patients were assessed. Among the STEMI group, 7,636 patients used salvianolate and 68,521 did not. Multivariate Cox regression analysis revealed that salvianolate use during hospitalization reduced cardiac death (aHR = 0.707, 95%CI = 0.623-0.803, P < 0.001) and MACCE (aHR = 0.730, 95%CI = 0.651-0.820, P < 0.001) at 30 days. These findings remained consistent in the matched population (n = 15,264) (cardiac death: aHR = 0.669, 95%CI = 0.569-0.786, P < 0.001; MACCE: aHR = 0.679, 95%CI = 0.586-0.787, P < 0.001). In the NSTEMI group, 6,461 patients used salvianolate, while67,912 did not. After matching, salvianolate use during hospitalization showed no significant difference in cardiac death and MACCE compared to not use. Conclusions Patients with STEMI treated with salvianolate exhibited improved short-term cardiovascular and cerebrovascular outcomes, while NSTEMI patients did not experience significant short-term prognosis enhancement.