Previous work has identified alterations in histone acetylation in animal models of drug addiction and depression. However, the mechanisms which integrate drugs and stress with changes in chromatin structure remain unclear. Here, we identify the activity-dependent class II histone deacetylase, HDAC5, as a central integrator of these stimuli with changes in chromatin structure and gene expression. Chronic, but not acute, exposure to cocaine or stress decreases HDAC5 function in the nucleus accumbens (NAc), a major brain reward region, which allows for increased histone acetylation and transcription of HDAC5 target genes. This regulation is behaviorally important, as loss of HDAC5 causes hypersensitive responses to chronic, not acute, cocaine or stress. These findings suggest that proper balance of histone acetylation is a crucial factor in the saliency of a given stimulus and that disruption of this balance is involved in the transition from an acute adaptive response to a chronic psychiatric illness.