Activity in the motor cortex predicts movements, seconds before they are initiated. This preparatory activity has been observed across cortical layers, including in descending pyramidal tract neurons in layer 5. A key question is how preparatory activity is maintained without causing movement, and is ultimately converted to a motor command to trigger appropriate movements. Here, using single-cell transcriptional profiling and axonal reconstructions, we identify two types of pyramidal tract neuron. Both types project to several targets in the basal ganglia and brainstem. One type projects to thalamic regions that connect back to motor cortex; populations of these neurons produced early preparatory activity that persisted until the movement was initiated. The second type projects to motor centres in the medulla and mainly produced late preparatory activity and motor commands. These results indicate that two types of motor cortex output neurons have specialized roles in motor control.