Imitation learning involves the acquisition of novel motor patterns based on action observation (AO). We used event-related functional magnetic resonance imaging to study the imitation learning of spatial sequences and rhythms during AO, motor imagery (MI), and imitative execution in nonmusicians and musicians. While both tasks engaged the fronto-parietal mirror circuit, the spatial sequence task recruited posterior parietal and dorsal premotor regions more strongly. The rhythm task involved an additional network for auditory working memory. This partial dissociation supports the concept of task-specific mirror mechanisms. Two regions of cognitive control were identified: 1) dorsolateral prefrontal cortex (DLPFC) was found to be more strongly activated during MI of novel spatial sequences, which allowed us to extend the 2-level model of imitation learning by Buccino et al. (2004) to spatial sequences. 2) During imitative execution of both tasks, the posterior medial frontal cortex was robustly activated, along with the DLPFC, which suggests that both regions are involved in the cognitive control of imitation learning. The musicians’ selective behavioral advantage for rhythm imitation was reflected cortically in enhanced sensory-motor processing during AO and by the absence of practice-related activation differences in DLPFC during rhythm execution.