Background: Deep brain stimulation (DBS) is a promising treatment for treatment-refractory obsessive–compulsive disorder (OCD). However, the effects of DBS on cognitive functioning remain unclear. Therefore, we aimed to assess cognitive safety of DBS for treatment-refractory OCD and the association between clinical changes and cognitive functioning. Methods: Patients with treatment-refractory OCD treated with DBS targeted at the nucleus accumbens (NAcc) were compared with a control group of 14 patients with treatment-refractory OCD treated with care as usual. We assessed cognitive functioning at baseline, 3 weeks postoperatively and following 8 months of DBS. We compared change in clinical symptoms with cognitive changes. Results: There were 16 patients in the DBS group and 14 patients in the control group. Three weeks postoperatively, the DBS group showed a significantly reduced performance on measures of visual organization and verbal fluency and a trend toward reduced performance on measures of visual memory and abstract reasoning. Cognitive functioning was found to be stable on all other measures. After 8 months of DBS, reduced performances persisted, except for a significant improvement in verbal fluency. Cognitive functioning in all other domains remained unaffected. We found no correlation between improvement of clinical symptoms and cognitive changes. Limitations: A limitation of this study was its relatively small sample size. Conclusion: Deep brain stimulation targeted at the NAcc may be considered a safe method in terms of cognition because cognitive functioning was unaffected on most neuropsychological measures. Nevertheless, we observed some minor reduced performance on specific measures of executive functioning that were possibly associated with surgical intervention. Our results suggest that severity of OCD symptoms is independent of cognitive functioning.