Coronary artery bypass surgery, performed with or without cardiopulmonary bypass, is frequently followed by postoperative cognitive decline. Near-infrared spectroscopy is commonly used to assess cerebral tissue oxygenation, especially during cardiac surgery. Recent studies have suggested an association between cerebral desaturation and postoperative cognitive dysfunction. We therefore studied cerebral oxygen desaturation, defined as area under the cerebral oxygenation curve < 40% of > 10 min.%, with respect to cognitive performance at 4 days (early) and 3 months (late) postoperatively, compared with baseline, using a computerised cognitive test battery. We included 60 patients, of mean (SD) age 62.8 (9.4) years, scheduled for elective coronary artery bypass grafting, who were randomly allocated to surgery with or without cardiopulmonary bypass. Cerebral desaturation occurred in only three patients and there was no difference in cerebral oxygenation between the two groups at any time. Among patients who received cardiopulmonary bypass, 18 (62%) had early cognitive decline, compared with 16 (53%) in the group without cardiopulmonary bypass (p = 0.50). Three months after surgery, 11 patients (39%) in the cardiopulmonary bypass group displayed cognitive dysfunction, compared with four (14%) in the non-cardiopulmonary bypass group (p = 0.03). The use of cardiopulmonary bypass was identified as an independent risk factor for the development of late cognitive dysfunction (OR 6.4 (95% CI 1.2–33.0) p = 0.027. In conclusion, although cerebral oxygen desaturation was rare in our population, postoperative cognitive decline was common in both groups, suggesting that factors other than hypoxic neuronal injury are responsible.