Electrocardiogram (ECG) is required during Magnetic Resonance Imaging (MRI) for two reasons, patient monitoring and MRI sequence synchronization for cardiovascular imaging. The MRI environment severely distorts ECG signals. The Magnetic Field Gradients (MFG) especially induce artifacts, which make ECG analysis during MRI acquisition challenging. Specific signal processing is thus required. An MFG artifact modeling has been proposed for their suppression. However the resulting techniques do not take the ECG signals into account during the model parameter estimation. Recently, ECG denoising based on an artificial ECG model and nonlinear Bayesian filtering has been presented. In this paper, a new MFG artifact suppression method based on nonlinear Bayesian filtering and the unification of the ECG and MFG models is proposed. This new approach enables accurate patient monitoring and outperforms state-of-the-art methods in terms of both QRS detection quality and signal to noise ratio.