The generation of purposive movement by mammals involves coordinated activity in the corticospinal and corticostriatal systems, which are involved in different aspects of motor control. In the motor cortex, corticospinal and corticostriatal neurons are closely intermingled, raising the question of whether and how information flows intracortically within and across these two channels. To explore this, we developed an optogenetic technique based on retrograde transfection of neurons with deletion-mutant rabies virus encoding channelrhodopsin-2, and used this in conjunction with retrograde anatomical labeling to stimulate and record from identified projection neurons in mouse motor cortex. We also used paired recordings to measure unitary connections. Both corticospinal and callosally projecting corticostriatal neurons in layer 5B formed within-class (recurrent) connections, with higher connection probability among corticostriatal than among corticospinal neurons. In contrast, across-class connectivity was extraordinarily asymmetric, essentially unidirectional from corticostriatal to corticospinal. Corticostriatal neurons in layer 5A and corticocortical neurons (callosal projection neurons similar to corticostriatal neurons) similarly received a paucity of corticospinal input. Connections involving presynaptic corticostriatal neurons had greater synaptic depression, and those involving postsynaptic corticospinal neurons had faster decaying EPSPs. Consequently, the three connections displayed a diversity of dynamic properties reflecting the different combinations of presynaptic and postsynaptic projection neurons. Collectively, these findings delineate a four-way specialized excitatory microcircuit formed by corticospinal and corticostriatal neurons. The "rectifying" corticostriatal-to-corticospinal connectivity implies a hierarchical organization and functional compartmentalization of corticospinal activity via unidirectional signaling from higher-order (corticostriatal) to lower-order (corticospinal) output neurons.