The circuits that control movement are comprised of discrete subtypes of motor neurons. How motor neuron subclasses develop and extend axons to their correct targets is still poorly understood. We show that LIM homeodomain factors Lhx3 and Lhx4 are expressed transiently in motor neurons whose axons emerge ventrally from the neural tube (v-MN). Motor neurons develop in embryos deficient in both Lhx3 and Lhx4, but v-MN cells switch their subclass identity to become motor neurons that extend axons dorsally from the neural tube (d-MN). Conversely, the misexpression of Lhx3 in dorsal-exiting motor neurons is sufficient to reorient their axonal projections ventrally. Thus, Lhx3 and Lhx4 act in a binary fashion during a brief period in development to specify the trajectory of motor axons from the neural tube.