The brainstem pedunculopontine nucleus has a likely, although unclear, role in gait control, and is a potential deep brain stimulation target for treating resistant gait disorders. These disorders are a major therapeutic challenge for the ageing population, especially in Parkinson’s disease where gait and balance disorders can become resistant to both dopaminergic medication and subthalamic nucleus stimulation. Here, we present electrophysiological evidence that the pedunculopontine and subthalamic nuclei are involved in distinct aspects of gait using a locomotor imagery task in 14 patients with Parkinson’s disease undergoing surgery for the implantation of pedunculopontine or subthalamic nuclei deep brain stimulation electrodes. We performed electrophysiological recordings in two phases, once during surgery, and again several days after surgery in a subset of patients. The majority of pedunculopontine nucleus neurons (57%) recorded intrasurgically exhibited changes in activity related to different task components, with 29% modulated during visual stimulation, 41% modulated during voluntary hand movement, and 49% modulated during imaginary gait. Pedunculopontine nucleus local field potentials recorded post-surgically were modulated in the beta and gamma bands during visual and motor events, and we observed alpha and beta band synchronization that was sustained for the duration of imaginary gait and spatially localized within the pedunculopontine nucleus. In contrast, significantly fewer subthalamic nucleus neurons (27%) recorded intrasurgically were modulated during the locomotor imagery, with most increasing or decreasing activity phasically during the hand movement that initiated or terminated imaginary gait. Our data support the hypothesis that the pedunculopontine nucleus influences gait control in manners extending beyond simply driving pattern generation. In contrast, the subthalamic nucleus seems to control movement execution that is not likely to be gait-specific. These data highlight the crucial role of these two nuclei in motor control and shed light on the complex functions of the lateral mesencephalus in humans.