Brain injury that results in an initial behavioural deficit is frequently followed by spontaneous recovery. The intrinsic mechanism of this functional recovery has never been fully understood. Here, we show that reorganization of the corticospinal tract induced by target-derived brain-derived neurotrophic factor is crucial for spontaneous recovery of motor function following brain injury. After destruction of unilateral sensorimotor cortex, intact-side corticospinal tract formed sprouting fibres into the specific lamina of the denervated side of the cervical spinal cord, and made new contact with two types of spinal interneurons-segmental and propriospinal neurons. Anatomical and electrophysiological analyses revealed that this rewired corticospinal tract functionally linked to motor neurons and forelimb muscles. This newly formed corticospinal circuit was necessary for motor recovery, because transection of the circuit led to impairment of recovering forelimb function. Knockdown of brain-derived neurotrophic factor in the spinal neurons or its receptor in the intact corticospinal neurons diminished fibre sprouting of the corticospinal tract. Our findings establish the anatomical, functional and molecular basis for the intrinsic capacity of neurons to form compensatory neural network following injury.