The aim of the present study was to investigate the protective role of hyperoxia liquid in regulating cardiopulmonary bypass (CPB)‑induced myocardial damage and its possible underlying mechanism. In the CPB‑induced rat model, hyperoxia liquid enhanced left ventricular ejection fraction (LVEF), reduced the left ventricular internal dimension systole (LVIDs) level, inhibited malondialdehyde levels, increased superoxide dismutase, glutathione (GSH) and GSH peroxidase levels, suppressed heart cell apoptosis, and induced the nuclear factor erythroid 2‑related factor 2 (Nrf2) and heme oxygenase‑1 (HO‑1) signaling pathway. Then, ML385, a Nrf2 inhibitor, was used to attenuate the effect of hyperoxia liquid on LVEF and LVIDs levels, oxidative stress and heart cell apoptosis in the CPB‑induced rat model. Collectively, the results of the present study demonstrated that the protective role of hyperoxia liquid may regulate oxidative stress in a CPB‑induced rat model through the Nrf2‑antioxidant response element signaling pathway.