The aim of this study was to determine the relative involvement of the corticospinal (CS) pathway in voluntarily controlled walking compared to unconstrained walking. In the voluntarily controlled walking condition, subjects had to walk at the same speed as in unconstrained walking with a mechanical constraint, which is known to affect specifically the upper-leg muscles. The motor cortex was activated transcranially using a focal magnetic stimulation coil in order to elicit motor evoked potentials (MEPs) in the rectus femoris (RF) and the biceps femoris (BF). The magnetic stimulation was delivered at the end of the swing (at 90% of the cycle duration), when the EMG backgrounds were similar in the two experimental conditions. For each subject in each condition, MEPs were measured for several stimulus intensities in order to establish the input/output (I/O) curve (MEPs amplitude plotted against stimulus strength). The results showed a significant increase in the MEPs amplitude of both the RF and BF in voluntarily controlled walking compared to unconstrained walking, which is the first evidence of cofacilitation of MEPs in antagonist upper-leg muscles during human gait. In conclusion, although a lot of studies have emphasized a privileged input of the corticospinal pathway to the distal lower-leg muscles, this study shows that, if a locomotory task requires fine control of the proximal upper-leg muscles, a selective facilitation of MEPs is observed in these muscles.