Learning from mistakes is a key feature of human behavior. However, the mechanisms underlying short-term adaptation to erroneous action are still poorly understood. One possibility relies on the modulation of attentional systems after an error. To explore this possibility, we have designed a Stroop-like visuo-motor task in monkeys that favors incorrect action. Using this task, we previously found that single neurons recorded from the anterior cingulate cortex (ACC) were closely tuned to behavioral performance and, more particularly, that the activity of most neurons was biased towards the evaluation of erroneous action. Here we describe single neurons engaged in both error detection and response alertness processing, whose activation is closely associated with the improvement of subsequent behavioral performance. Specifically, we show that the effect of a warning stimulus on neuronal firing is enhanced after an erroneous response rather than a successful one and that this outcome is correlated with an error rate decrease. Our results suggest that the anterior cingulate cortex, which exhibits this activity, serves as a powerful computational locus for rapid behavioral adaptation.