Noxious stimuli have motivational power and can support associative learning, but the neural circuitry mediating such avoidance learning is poorly understood. The anterior cingulate cortex (ACC) is implicated in the affective response to noxious stimuli and the motivational properties of conditioned stimuli that predict noxious stimulation. Using conditioned place aversion (CPA) in rats, we found that excitatory amino acid microinjection into the ACC during conditioning produces avoidance learning in the absence of a peripheral noxious stimulus. Furthermore, microinjection of an excitatory amino acid antagonist into the ACC during conditioning blocked learning elicited by a noxious stimulus. ACC lesions made after conditioning did not impair expression of CPA. Thus, ACC neuronal activity is necessary and sufficient for noxious stimuli to produce an aversive teaching signal. Our results support the idea that a shared ACC pathway mediates both pain-induced negative affect and a nociceptor-driven aversive teaching signal.