A wireless brain–spine interface is presented that enables macaques with a spinal cord injury to regain locomotor movements of a paralysed leg. Grégoire Courtine and colleagues show that a fully implantable, wireless brain–spine interface can be used to improve locomotion after a unilateral spinal lesion in monkeys without training. The authors implanted monkeys with an electrode array in the leg area of the motor cortex and a stimulator in the lumbar spinal cord, enabling real-time decoding and stimulation. Decoded activity from the motor cortex was used to stimulate 'hotspot' locations in the lumbar spinal cord that control hindlimb flexion and extension during locomotion. Stimulating these hotspots enhanced flexion and extension of the target muscles during locomotion in intact monkeys and restored weight-bearing locomotion of the paralysed leg in monkeys with a unilateral spinal cord lesion six days after the injury. This proof-of-principle study shows that a similar system may improve or restore locomotion in people with spinal cord injury. Spinal cord injury disrupts the communication between the brain and the spinal circuits that orchestrate movement. To bypass the lesion, brain–computer interfaces1,2,3 have directly linked cortical activity to electrical stimulation of muscles, and have thus restored grasping abilities after hand paralysis1,4. Theoretically, this strategy could also restore control over leg muscle activity for walking5. However, replicating the complex sequence of individual muscle activation patterns underlying natural and adaptive locomotor movements poses formidable conceptual and technological challenges6,7. Recently, it was shown in rats that epidural electrical stimulation of the lumbar spinal cord can reproduce the natural activation of synergistic muscle groups producing locomotion8,9,10. Here we interface leg motor cortex activity with epidural electrical stimulation protocols to establish a brain–spine interface that alleviated gait deficits after a spinal cord injury in non-human primates. Rhesus monkeys (Macaca mulatta) were implanted with an intracortical microelectrode array in the leg area of the motor cortex and with a spinal cord stimulation system composed of a spatially selective epidural implant and a pulse generator with real-time triggering capabilities. We designed and implemented wireless control systems that linked online neural decoding of extension and flexion motor states with stimulation protocols promoting these movements. These systems allowed the monkeys to behave freely without any restrictions or constraining tethered electronics. After validation of the brain–spine interface in intact (uninjured) monkeys, we performed a unilateral corticospinal tract lesion at the thoracic level. As early as six days post-injury and without prior training of the monkeys, the brain–spine interface restored weight-bearing locomotion of the paralysed leg on a treadmill and overground. The implantable components integrated in the brain–spine interface have all been approved for investigational applications in similar human research, suggesting a practical translational pathway for proof-of-concept studies in people with spinal cord injury.