Cocaine-mediated repression of the histone methyltransferase (HMT) G9a has recently been implicated in transcriptional, morphological and behavioral responses to chronic cocaine administration. Here, using a ribosomal affinity purification approach, we found that G9a repression by cocaine occurred in both Drd1-expressing (striatonigral) and Drd2-expressing (striatopallidal) medium spiny neurons. Conditional knockout and overexpression of G9a within these distinct cell types, however, revealed divergent behavioral phenotypes in response to repeated cocaine treatment. Our studies further indicated that such developmental deletion of G9a selectively in Drd2 neurons resulted in the unsilencing of transcriptional programs normally specific to striatonigral neurons and in the acquisition of Drd1-associated projection and electrophysiological properties. This partial striatopallidal to striatonigral 'switching' phenotype in mice indicates a new role for G9a in contributing to neuronal subtype identity and suggests a critical function for cell type-specific histone methylation patterns in the regulation of behavioral responses to environmental stimuli.