Objective To explore the correlation between the levels of serum nuclear factor-erythroid 2-related factor 2 (Nrf2) as well as heme oxygenase-1 (HO-1) and cognitive dysfunction by determining the levels of Nrf2 and HO-1 in patients with obstructive sleep apnea (OSA) to different degrees and combining Montreal cognitive assessment (MoCA). Methods Serum levels of Nrf2 and HO-1 were determined in 32 patients with mild-moderate OSA, 23 patients with severe OSA and 20 healthy controls. The differences of Nrf2 and HO-1 levels among groups were compared. All subjects were evaluated by MoCA score. According to MoCA score, OSA patients were divided into two groups: OSA with mild cognitive impairment (MCI) group and OSA with normal cognition group. Serum Nrf2 and HO-1 levels were compared between the two groups, and the differences in the OSA patients with or without cognitive impairment were understood. Spearman correlation coefficient was used to explore the correlation between serum Nrf2 and HO-1 levels and cognitive function of OSA patients. The diagnostic value of serum Nrf2 and HO-1 in the OSA patients with cognitive impairment was determined by receiver operating characteristic curve. Results Serum levels of Nrf2 and HO-1 in the mild-moderate and severe OSA groups were higher than those in the control group, and those in the severe OSA group were higher than those in the mild-moderate OSA group (P<0.05). Compared with the OSA with normal cognition group, the serum HO-1 level in the OSA patients with MCI was higher (P<0.05), but the serum NRF2 level had no significant difference between the two groups (P>0.05). There was a negative correlation between serum HO-1 level and total MoCA score in the OSA patients (r=–0.495, P=0.000), but there was no significant correlation between serum Nrf2 and total MoCA score in the OSA patients (P>0.05). Serum Nrf2 and HO-1 were 0.791 and 0.818 for predicting OSA patients with cognitive impairment. The sensitivity was 84.20% and 86.80%, and the specificity was 67.60% and 73.00%, respectively. Conclusions Serum Nrf-2 and serum HO-1 play important role in the pathogenesis of OSA. Serum HO-1 level may be closely related to cognitive dysfunction in OSA patients. Detection of serum HO-1 may be helpful in early identification of cognitive dysfunction in OSA patients, which has potential clinical application value.