Although human cognition often occurs during dynamic motor actions, most studies of human brain dynamics examine subjects in static seated or prone conditions. EEG signals have historically been considered to be too noise prone to allow recording of brain dynamics during human locomotion. Here we applied a channel-based artifact template regression procedure and a subsequent spatial filtering approach to remove gait-related movement artifact from EEG signals recorded during walking and running. We first used stride time warping to remove gait artifact from high-density EEG recorded during a visual oddball discrimination task performed while walking and running. Next, we applied infomax independent component analysis (ICA) to parse the channel-based noise reduced EEG signals into maximally independent components (ICs) and then performed component-based template regression. Applying channel-based or channel-based plus component-based artifact rejection significantly reduced EEG spectral power in the 1.5- to 8.5-Hz frequency range during walking and running. In walking conditions, gait-related artifact was insubstantial: event-related potentials (ERPs), which were nearly identical to visual oddball discrimination events while standing, were visible before and after applying noise reduction. In the running condition, gait-related artifact severely compromised the EEG signals: stable average ERP time-courses of IC processes were only detectable after artifact removal. These findings show that high-density EEG can be used to study brain dynamics during whole body movements and that mechanical artifact from rhythmic gait events may be minimized using a template regression procedure.