Little is known about the impact of supraspinal centers on the control of human locomotion. Analyzing brain activity can help to clarify their impact and to improve the effects of locomotor training. A fMRI-compatible pneumatic robotic device is presented that can generate freely programmable, highly repetitive periodic active and passive leg movements comprised by hip, knee, and ankle joint displacements. Forces of up to 400N can be applied to each foot while the subject is lying in a supine position. Magnetic interference of the device with the magnetic field of the scanner is measurable, but does not affect the image quality as obtained by a usual image analysis procedure. In a first experiment, brain activity of one healthy subject was acquired during nine different gait-like movement conditions. Brain activity in the somatosensory and motor function related areas increased more when the subject actively moved the legs than when the legs were passively moved by the device. In almost all conditions, mean head motion could be limited to 2mm within the duration of one fMRI scan by a specifically developed head and trunk fixation system. Based on these results, it is concluded that our device will significantly contribute to a better understanding of human locomotor control and related therapeutic effects in spinal cord injured and stroke patients, and thereby, to improve training approaches.