The anterior cingulate cortex (ACC) has been implicated in both preparatory attention (i.e., selecting behaviorally relevant stimuli) and in detecting errors. We recorded from the rat ACC and medial prefrontal cortex (mPFC), which is functionally homologous to the primate dorsolateral PFC, during an attention task. The three-choice serial reaction time task requires a rat to orient toward and divide attention between three brief (300 ms duration) light stimuli presented in random order across nose poke holes in an operant chamber. In both the ACC and mPFC, we found that neural activity was related to the level of preparatory (precue) attention and subsequent correct or incorrect choice, in that the magnitude of the single units' response to the cue was lower on incorrect trials and was not different than baseline on unattended trials. This preparatory neural activity consisted of both excitatory and inhibitory phasic responses. The number of units responding to the cue was similarly graded, in that fewer units exhibited phasic responses to the cue on incorrect and unattended trials, compared with correct trials. Although preparatory activity was found in both the ACC and mPFC, activity after incorrect nose pokes, which may be related to error detection, were only observed in the ACC. Thus, during the same behavioral sequence, the ACC encodes both error-related events and preparatory attention, whereas the mPFC only participates in preparatory attention. The finding of substantial inhibitory activity during the preparatory period suggests a critical role for inhibition of pyramidal cells in PFC-mediated cognitive functions.