The simultaneous acquisition of electroencephalography and functional magnetic resonance imaging (EEG-fMRI) is a multimodal technique extensively applied for mapping the human brain. However, the quality of EEG data obtained within the MRI environment is strongly affected by subject motion due to the induction of voltages in addition to artefacts caused by the scanning gradients and the heartbeat. This has limited its application in populations such as paediatric patients or to study epileptic seizure onset. Recent work has used a Moiré-phase grating and a MR-compatible camera to prospectively update image acquisition and improve fMRI quality (prospective motion correction: PMC). In this study, we use this technology to retrospectively reduce the spurious voltages induced by motion in the EEG data acquired inside the MRI scanner, with and without fMRI acquisitions. This was achieved by modelling induced voltages from the tracking system motion parameters; position and angles, their first derivative (velocities) and the velocity squared. This model was used to remove the voltages related to the detected motion via a linear regression. Since EEG quality during fMRI relies on a temporally stable gradient artefact (GA) template (calculated from averaging EEG epochs matched to scan volume or slice acquisition), this was evaluated in sessions both with and without motion contamination, and with and without PMC. We demonstrate that our approach is capable of significantly reducing motion-related artefact with a magnitude of up to 10 mm of translation, 6° of rotation and velocities of 50 mm/s, while preserving physiological information. We also demonstrate that the EEG-GA variance is not increased by the gradient direction changes associated with PMC. Provided a scan slice-based GA template is used (rather than a scan volume GA template) we demonstrate that EEG variance during motion can be supressed towards levels found when subjects are still. In summary, we show that PMC can be used to dramatically improve EEG quality during large amplitude movements, while benefiting from previously reported improvements in fMRI quality, and does not affect EEG data quality in the absence of large amplitude movements.