The present study aimed to investigate the protective effects of ghrelin against oxidative stress, inducible nitric oxide synthase (iNOS) and inflammation in a mouse model of myocardial ischemia/reperfusion injury (MIRI). In addition, the study aimed to determine its underlying mechanisms. A mouse model of MIRI was used in vivo, in order to ascertain the protective effects of ghrelin on MIRI. Commercial kits were used to measure the serum levels of creatine kinase (CK) and lactate dehydrogenase (LDH) in MIRI mice. Furthermore, Evan's Blue-triphenyltetrazolium chloride solution was used to analyze the protective effects of ghrelin against infarct size in MIRI mice. The underlying mechanisms were determined by measuring MIRI-induced tumor necrosis factor (TNF)‑α, interleukin (IL)‑6, superoxide dismutase (SOD), glutathione (GSH), GSH-peroxidase (GSH‑PX), malondialdehyde (MDA) and caspase‑3/caspase‑9 activities, and iNOS, high mobility group box 1 (HMGB1), Toll‑like receptor 4 (TLR4) and nuclear factor (NF)‑κB protein expression in MIRI mice. The results demonstrated that MIRI led to an increase in infarct size; CK, LDH, TNF‑α, IL‑6, MDA, caspase‑3 and caspase-9 serum levels; and iNOS protein expression. MIRI resulted in inhibition of SOD, FSH and GSH‑PX levels. Conversely, these alterations were significantly inhibited following treatment with ghrelin. In addition, the protective effects of ghrelin against MIRI suppressed HMGB1, TLR4 and NF‑κB protein expression in MIRI mice. The present study revealed that ghrelin exerted protective effects against oxidative stress, iNOS and inflammation in MIRI mice via the HMGB1/TLR4/NF-κB pathway.