Myocardial ischemia/reperfusion injury (MIRI) is related to ferroptosis and apoptosis elicited by reactive oxygen species (ROS). In this research, we investigated the protective effect of salvianolic acid B (SAB) as a natural antioxidant on ferroptosis and apoptosis in the MIRI process, and discussed the protective mechanism inhibiting ubiquitin-proteasome degradation of glutathione peroxidase 4 (GPX4) and the c-Jun N-terminal kinases (JNK) apoptosis signal pathway. We observed that ferroptosis and apoptosis occurred in the MIRI rat model in vivo and the H9c2 cardiomyocyte hypoxia/reoxygenation (H/R) damage model in vitro. SAB can alleviate tissue damage related to ROS, ferroptosis and apoptosis. Ubiquitin-proteasome degradation of GPX4 occurred in H/R models, and SAB reduced the ubiquitin-proteasome degradation of GPX4. SAB downregulates JNK phosphorylation and the expression of BCL2-Associated X (Bax)/B-cell lymphoma-2 (Bcl-2) and Caspase-3 to inhibit apoptosis. The role of GPX4 in the cardioprotection of SAB was further verified by the elimination effect of the GPX4 inhibitor RAS-selective lethal 3 (RSL3). This research shows that SAB may be used as a myocardial protective agent against oxidative stress, ferroptosis and apoptosis, and has potential clinical application prospects.