The magnetohydrodynamic effect generates voltages related to blood flow, which are superimposed on the electrocardiogram (ECG) used for gating during cardiac magnetic resonance imaging (MRI). A method is presented for extracting the magnetohydrodynamic signal from the ECG. The extracted magnetohydrodynamic blood flow potential may be physiologically meaningful due to its relationship to blood flow. Removal of the magnetohydrodynamic voltages from the ECG can potentially lead to improved gating and diagnostically useful ECGs.