Generalization is an important process that allows animals to extract rules from regularities of past experience and apply them to analogous situations. In particular, the generalization of previously learned actions to novel instruments allows animals to use past experience to act faster and more efficiently in an ever-changing environment. However, generalization of actions to a dissimilar instrument or situation may also be detrimental. In this study, we investigated the neural bases of action generalization and discrimination in mice trained on a lever-pressing task. Using specific schedules of reinforcement known to bias animals towards habitual or goal-directed behaviors, we confirmed that action generalization is more prominent in animals using habitual rather than goal-directed strategies. We discovered that selective excitotoxic lesions of the dorsolateral and dorsomedial striatum have opposite effects on the generalization of a previously learned action to a novel lever. Whereas lesions of the dorsolateral striatum impair action generalization, dorsomedial striatum lesions affect action discrimination and bias subjects towards action generalization. Importantly, these lesions do not affect the ability of animals to explore or match their lever-pressing rate to the reinforcement rate, or the ability to distinguish between different levers. The data presented here reveal that dorsolateral and dorsomedial striatal circuits have opposing roles in the generalization of previously learned actions to novel instruments, and suggest that these circuits compete for the expression of generalization in novel situations.