Myocardial ischemia, hypoxia and reperfusion injury are induced by aortic occlusion, cardiac arrest and resuscitation during cardiopulmonary bypass (CPB), which can severely affect cardiac function. The aim of the present study was to investigate the effects of hydrogen‑rich solution (HRS) and aquaporin (AQP) on cardiopulmonary bypass (CPB)‑induced myocardial injury, and determine the mechanism of the phosphatidylinositol 3‑kinase (PI3K)/protein kinase B (Akt) signaling pathway. Sprague Dawley rats were divided into a sham operation group, a CPB surgery group and a HRS group. A CPB model was established, and the hemodynamic parameters were determined at the termination of CPB. The myocardial tissues were observed by hematoxylin and eosin, and Masson staining. The levels of myocardial injury markers [adult cardiac troponin I (cTnI), lactate dehydrogenase (LDH), creatine kinase MB (CK‑MB) and brain natriuretic peptide (BNP)], inflammatory factors [interleukin (IL)‑1β, IL‑6 and tumor necrosis factor‑α (TNF‑α)] and oxidative stress indicators [superoxide dismutase (SOD), malondialdehyde (MDA) and myeloperoxidase (MPO)] were determined by ELISA. Furthermore, H9C2 cells were treated with HRS following hypoxia/reoxygenation. Cell viability and cell apoptosis were investigated. The expression of apoptosis regulator Bcl‑2 (Bcl‑2), apoptosis regulator Bax (Bax), caspase 3, AQP‑1, AQP‑4, phosphorylated (p)‑Akt, heme oxygenase 1 (HO‑1) and nuclear factor erythroid 2‑related factor 2 (Nrf2) were investigated using western blotting and quantitative‑polymerase chain reaction of tissues and cells. Following CPB, myocardial cell arrangement was disordered, myocardial injury markers (cTnI, LDH, CK‑MB and BNP), inflammatory cytokines (IL‑1β, IL‑6 and TNF‑α) and MDA levels were significantly increased compared with the sham group; whereas the SOD levels were significantly downregulated following CPB compared with the sham group. HRS attenuated myocardial injury, reduced the expression levels of cTnI, LDH, CK‑MB, BNP, IL‑1β, IL‑6, TNF‑α, MDA and MPO, and increased SOD release. Levels of Bcl‑2, AQP‑1, AQP‑4, p‑Akt, HO‑1 and Nrf2 were significantly increased following HRS; whereas Bax and caspase‑3 expression levels were significantly reduced following CPB. HRS treatment significantly increased the viability of myocardial cells, reduced the rate of myocardial cell apoptosis and the release of MDA and LDH compared with the CPB group. A PI3K inhibitor (LY294002) was revealed to reverse the protective effect of HRS treatment. HRS was demonstrated to attenuate CPB‑induced myocardial injury, suppress AQP‑1 and AQP‑4 expression following CPB treatment and protect myocardial cells via the PI3K/Akt signaling pathway.