Drugs of abuse regulate the transcription factor cAMP response element-binding protein (CREB) in striatal regions, including the nucleus accumbens (NAc). To explore how regulation of CREB in the NAc affects behavior, we used herpes simplex virus (HSV) vectors to elevate CREB expression in this region or to overexpress a dominant-negative mutant CREB (mCREB) that blocks CREB function. Rats treated with HSV-mCREB in place conditioning studies spent more time in environments associated with cocaine, indicating increased cocaine reward. Conversely, rats treated with HSV-CREB spent less time in cocaine-associated environments, indicating increased cocaine aversion. Studies in which drug-environment pairings were varied to coincide with either the early or late effects of cocaine suggest that CREB-associated place aversions reflect increased cocaine withdrawal. Because cocaine withdrawal can be accompanied by symptoms of depression, we examined how altered CREB function in the NAc affects behavior in the forced swim test (FST). Elevated CREB expression increased immobility in the FST, an effect that is opposite to that caused by standard antidepressants and is consistent with a link between CREB and dysphoria. Conversely, overexpression of mCREB decreased immobility, an effect similar to that caused by antidepressants. Moreover, the kappa opioid receptor antagonist nor-Binaltorphimine decreased immobility in HSV-CREB- and HSV-mCREB-treated rats, suggesting that CREB-mediated induction of dynorphin (an endogenous kappa receptor ligand) contributes to immobility behavior in the FST. Exposure to the FST itself dramatically increased CREB function in the NAc. These findings raise the possibility that CREB-mediated transcription within the NAc regulates dysphoric states.