Globally, acute myocardial infarction (AMI) is a serious condition affecting millions of individuals. While AMI therapy improves blood flow during surgery, reperfusion-induced injury may also occur, leading to secondary cardiac damage or even death. Here, we investigated miR-129-5p in myocardial ischemia-reperfusion (I/R) injury in rats, to explore reperfusion-related molecular mechanisms in myocardium. We used Sprague Dawley rats to establish a myocardial I/R model, with agomiR-129-5p injection, and used rat cardiomyocytes (H9c2) treated with anoxia-reoxygenation (A/R) to mimic myocardial I/R injury in vitro. A dual-luciferase reporter assay determined miR-129-5p binding to high mobility group box-1 (HMGB1) in H9c2 cells. We showed that exogenous miR-129-5p restored cardiac function indices, alleviated cardiac injury, relieved inflammatory effects and reduced infarct size and cell apoptosis in rat myocardium after I/R treatment. Elevated miR-129-5p induced a reduction in HMGB1 expression in rat I/R myocardium. miR-129-5p also targeted HMGB1, and negatively regulated its expression in H9c2 cells. Moreover, miR-129-5p overexpression in the cardiomyocytes reduced cell apoptosis and recovered cell viability after A/R injury, which was reversed by subsequent HMGB1 overexpression. These findings suggest miR-129-5p plays a cardioprotective role in ameliorating myocardial I/R injury in rats, by negatively targeting HMGB1. This mechanism provides new insights into the treatment of myocardium reperfusion-related damage.