Axon regeneration can be induced across anatomically complete spinal cord injury (SCI), but robust functional restoration has been elusive. Whether restoring neurological functions requires directed regeneration of axons from specific neuronal subpopulations to their natural target regions remains unclear. To address this question, we applied projection-specific and comparative single-nucleus RNA sequencing to identify neuronal subpopulations that restore walking after incomplete SCI. We show that chemoattracting and guiding the transected axons of these neurons to their natural target region led to substantial recovery of walking after complete SCI in mice, whereas regeneration of axons simply across the lesion had no effect. Thus, reestablishing the natural projections of characterized neurons forms an essential part of axon regeneration strategies aimed at restoring lost neurological functions.