Pain is an unpleasant experience. How the brain’s affective neural circuits attribute this aversive quality to nociceptive information remains unknown. By means of time-lapse in vivo calcium imaging and neural activity manipulation in freely behaving mice encountering noxious stimuli, we identified a distinct neural ensemble in the basolateral amygdala that encodes the negative affective valence of pain. Silencing this nociceptive ensemble alleviated pain affective-motivational behaviors without altering the detection of noxious stimuli, withdrawal reflexes, anxiety, or reward. Following peripheral nerve injury, innocuous stimuli activated this nociceptive ensemble to drive dysfunctional perceptual changes associated with neuropathic pain, including pain aversion to light touch (allodynia). These results identify the amygdalar representations of noxious stimuli that are functionally required for the negative affective qualities of acute and chronic pain perception.