Overactive performance monitoring, as reflected by enhanced neural responses to errors (the error-related negativity, ERN), is considered a biomarker for obsessive-compulsive disorder (OCD) and may be a promising target for novel treatment approaches. Prior research suggests that non-invasive brain stimulation with transcranial direct current stimulation (tDCS) may reduce the ERN in healthy individuals, yet no study has investigated its efficacy in attenuating the ERN in OCD. In this preregistered, randomized, sham-controlled, crossover study, we investigated effects of tDCS on performance monitoring in patients with OCD (n = 28) and healthy individuals (n = 28). Cathodal and sham tDCS was applied over the presupplementary motor area (pre-SMA) in two sessions, each followed by electroencephalogram recording during a flanker task. Cathodal tDCS reduced the ERN amplitude compared to sham tDCS, albeit this effect was only marginally significant (p = .052; mean difference: 0.86 μV). Additionally, cathodal tDCS reduced the correct-response negativity and increased the error positivity. These neural modulations were not accompanied by behavioral changes. Moreover, we found no evidence that the tDCS effect was more pronounced in the patient group. In summary, our findings indicate that tDCS over the pre-SMA modulates neural correlates of performance monitoring across groups. Therefore, this study represents a valuable starting point for future research to determine whether repeated tDCS application induces a more pronounced ERN attenuation and normalizes aberrant performance monitoring in the long term, thereby potentially alleviating obsessive-compulsive symptoms and providing a psychophysiological intervention strategy for individuals who do not benefit sufficiently from existing interventions.