In magnetic resonance imaging (MRI), imaging a moving organ such as the heart requires a trigger so that successive scans can be synchronized. In the case of cardiac and respiratory imaging, the QRS complex of ECG is used as a trigger signal for MRI scan. But, gradient and radio frequency (RF) artifacts which are caused to static and dynamic field in MRI scanner cause interference in the ECG. Also, the signal shape of theses artifacts can be similar to the QRS-complex, causing possible misinterpretation during patient monitoring and false gating of the MRI. In case of using general FIR or IIR band-pass filters for minimizing the artifacts, artifact- reduction-ratio is not excellent. So, an adaptive real-time digital filter is proposed for reduction of noise by gradient and RF artifacts. The proposed filter for MRI- cardiac and respiratory gating is based on the noise- canceller with normalized least mean square (NLMS) algorithm. The reference signals of the adaptive noise canceller are a combination of the noisy three channel ECG signals. In conclusions, the proposed method showed the acceptable quality of ECG and respiration with sufficient SNR for gating the MRI and possibility of real time implementation.