A magnetic resonance imaging apparatus includes an imaging unit and a
compensation unit. The imaging unit acquires image data by imaging with
applying a pre-pulse for controlling a contrast. The compensation unit
suppresses a remanent magnetic field having an intensity according to a
slice position. The remanent magnetic field is at an application timing
of the pre-pulse and due to an eddy current generated by at least one
gradient magnetic field applied before applying the pre-pulse.