During Pavlovian-to-instrumental transfer (PIT), learned Pavlovian cues significantly modulate ongoing instrumental actions. This phenomenon is suggested as a mechanism under which conditioned stimuli may lead to relapse in addicted populations. Following discriminative Pavlovian learning and instrumental conditioning with sucrose, one group of rats (naive) underwent electrophysiological recordings in the nucleus accumbens core and shell during a single PIT session. Other groups, following Pavlovian and instrumental conditioning, were subsequently trained to self-administer cocaine with nosepoke responses, or received yoked saline infusions and nosepoked for water rewards, and then performed PIT while electrophysiological recordings were taken in the nucleus accumbens. Behaviorally, although both naive and saline-treated groups showed increases in lever pressing during the conditioned stimulus cue, this effect was significantly enhanced in the cocaine-treated group. Neurons in the core and shell tracked these behavioral changes. In control animals, core neurons were significantly more likely to encode general information about cues, rewards and responses than those in the shell, and positively correlated with behavioral PIT performance, whereas PIT-specific encoding in the shell, but not core, tracked PIT performance. In contrast, following cocaine exposure, there was a significant increase in neural encoding of all task-relevant events that was selective to the shell. Given that cocaine exposure enhanced both behavior and shell-specific task encoding, these findings suggest that, whereas the core is important for acquiring the information about cues and response contingencies, the shell is important for using this information to guide and modulate behavior and is specifically affected following a history of cocaine self-administration.