The mammalian motor system is organized around distinct subcortical subsystems, suggesting that the intracortical circuits immediately upstream of spinal cord and basal ganglia might be functionally differentiated as well. We found that the main excitatory pathway in mouse motor cortex, layer 2/3-->5, is fractionated into distinct pathways targeting corticospinal and corticostriatal neurons, which are involved in motor control. However, connections were selective for neurons in certain sublayers: corticospinal neurons in upper layer 5B and corticostriatal neurons in lower 5A. A simple structural combinatorial principle accounts for this highly specific functional circuit architecture: potential connectivity is established by neuronal sublayer positioning and actual connectivity in this framework is determined by long-range axonal projection targets. Thus, intracortical circuits of these pyramidal neurons are specified not only by their long-range axonal targets or their layer or sublayer positions, but by both, in specific combinations.