Obstructive sleep apnea (OSA) is a sleep disorder which results in daytime sleepiness and impaired memory function. The aim of this study was to investigate the effect of continuous positive airway pressure (CPAP) on daytime sleepiness and memory function in OSA patients. We also investigated whether CPAP compliance impacted the effect of this treatment. The nonrandomized, nonblinded clinical trial enrolled 66 patients with moderate-to-severe OSA subjects. All subjects completed a polysomnographic study, daytime sleepiness questionnaires (the Epworth Sleepiness Scale and the Pittsburgh Sleep Quality Index), and four memory function tests (working memory; processing speed [PS]; logical memory [LM]; face memory [FM]). Before CPAP treatment, no significant differences (P < 0.05) were noted in the demographic data, daytime sleepiness, or memory function between two groups (with/without CPAP). However, OSA patients treated with CPAP for 2 months showed significant improvements in daytime sleepiness, PS, mostly of LM, and FM comparing to 2 months ago. As compared to those who did not receive CPAP treatment, CPAP can improve only parts of LM (delayed LM [DLM] and LM percentage [LMP]). In addition, compared to control group, a significant improvement of daytime sleepiness and LM (LM learning, DLM, and LMP) in good compliance with CPAP treatment group and of DLM and LMP in the low compliance with CPAP treatment group was found. CPAP treatment for 2 months could improve some of LM in OSA patients, especially in patients exhibiting good CPAP compliance.