The basal ganglia have been suggested to play a key role in performance monitoring and resulting behavioral adjustments. It is assumed that the integration of prefrontal and motor cortico-striato-thalamo-cortical circuits provides contextual information to the motor anterior cingulate cortex regions to enable their function in performance monitoring. So far, direct evidence is missing, however. We addressed the involvement of frontostriatal circuits in performance monitoring by collecting event-related brain potentials (ERPs) and behavioral data in nine patients with focal basal ganglia lesions and seven patients with lateral prefrontal cortex lesions while they performed a flanker task. In both patient groups, the amplitude of the error-related negativity was reduced, diminishing the difference to the ERPs on correct responses. Despite these electrophysiological abnormalities, most of the patients were able to correct errors. Only in lateral prefrontal cortex patients whose lesions extended into the frontal white matter, disrupting the connections to the motor anterior cingulate cortex and the striatum, were error corrections severely impaired. In sum, the fronto-striato-thalamo-cortical circuits seem necessary for the generation of error-related negativity, even when brain plasticity has resulted in behavioral compensation of the damage. Thus, error-related ERPs in patients provide a sensitive measure of the integrity of the performance monitoring network.