BACKGROUND: Optimal behavior and decision making result from a balance of control between two strategies, one cognitive/goal-directed and one habitual. These systems are known to rely on the anatomically distinct dorsomedial and dorsolateral striatum, respectively. However, the transcriptional regulatory mechanisms required to learn and transition between these strategies are unknown. Here we examined the role of one chromatin-based transcriptional regulator, histone modification via histone deacetylases (HDACs), in this process. METHODS: We combined procedures that diagnose behavioral strategy in rats with pharmacological and viral-mediated HDAC manipulations, chromatin immunoprecipitation, and messenger RNA quantification. RESULTS: The results indicate that dorsal striatal HDAC3 activity constrains habit formation. Systemic HDAC inhibition following instrumental (lever press → reward) conditioning increased histone acetylation throughout the dorsal striatum and accelerated habitual control of behavior. HDAC3 was removed from the promoters of key learning-related genes in the dorsal striatum as habits formed with overtraining and with posttraining HDAC inhibition. Decreasing HDAC3 function, either by selective pharmacological inhibition or by expression of dominant-negative mutated HDAC3, in either the dorsolateral striatum or the dorsomedial striatum accelerated habit formation, while HDAC3 overexpression in either region prevented habit. CONCLUSIONS: These results challenge the strict dissociation between dorsomedial striatum and dorsolateral striatum function in goal-directed versus habitual behavioral control and identify dorsostriatal HDAC3 as a critical molecular directive of the transition to habit. Because this transition is disrupted in many neurodegenerative and psychiatric diseases, these data suggest a potential molecular mechanism for the negative behavioral symptoms of these conditions and a target for therapeutic intervention.