Cardiopulmonary bypass (CPB) constitutes one of the primary methodologies pertaining to cardiac surgery. However, this form of surgery can cause damage to the body. Many studies have reported that dexmedetomidine confers cerebral protection. In this study, we aimed to investigate the effect and mechanism of dexmedetomidine on neuronal apoptosis caused by CPB. Here, rats were treated with different doses of dexmedetomidine by intravenous infusion 2 hours after CPB. We observed that dexmedetomidine treatment to rats reduces the S100β, NSE levels in plasma, and neuronal apoptosis following CPB in a dose-dependent manner. Furthermore, we observed that the beneficial effect of dexmedetomidine treatment following CPB was associated with a reduction in IL6, an inflammatory cytokine in plasma and cortex. Our results suggest that dexmedetomidine provides neuroprotective effects by inhibiting inflammation and reducing neuronal apoptosis. There was a correlation between the protective effect on the brain and the dose of dexmedetomidine. In addition, dexmedetomidine administration inhibits phosphorylation of JAK2 and STAT3 proteins in the hippocampus of rats 2 hours after CPB. Therefore, we speculate that the JAK2–STAT3 pathway plays an important role in the neuroprotective effects of dexmedetomidine following brain injury induced by CPB.