The neocortex contains an unparalleled diversity of neuronal subtypes, each defined by distinct traits that are developmentally acquired under the control of subtype-specific and pan-neuronal genes. The regulatory logic that orchestrates the expression of these unique combinations of genes is unknown for any class of cortical neuron. Here, we report that Fezf2 is a selector gene able to regulate the expression of gene sets that collectively define mouse corticospinal motor neurons (CSMN). We find that Fezf2 directly induces the glutamatergic identity of CSMN via activation of Vglut1 (Slc17a7) and inhibits a GABAergic fate by repressing transcription of Gad1. In addition, we identify the axon guidance receptor EphB1 as a target of Fezf2 necessary to execute the ipsilateral extension of the corticospinal tract. Our data indicate that co-regulated expression of neuron subtype-specific and pan-neuronal gene batteries by a single transcription factor is one component of the regulatory logic responsible for the establishment of CSMN identity.