The co-emergence of a six-layered cerebral neocortex and its corticospinal output system is one of the evolutionary hallmarks of mammals. However, the genetic programs that underlie their development and evolution remain poorly understood. Here we identify a conserved non-exonic element (E4) that acts as a cortex-specific enhancer for the nearby gene Fezf2 (also known as Fezl and Zfp312), which is required for the specification of corticospinal neuron identity and connectivity. We find that SOX4 and SOX11 functionally compete with the repressor SOX5 in the transactivation of E4. Cortex-specific double deletion of Sox4 and Sox11 leads to the loss of Fezf2 expression, failed specification of corticospinal neurons and, independent of Fezf2, a reeler-like inversion of layers. We show evidence supporting the emergence of functional SOX-binding sites in E4 during tetrapod evolution, and their subsequent stabilization in mammals and possibly amniotes. These findings reveal that SOX transcription factors converge onto a cis-acting element of Fezf2 and form critical components of a regulatory network controlling the identity and connectivity of corticospinal neurons.