PROBLEM TO BE SOLVED: To provide a magnetic resonance imaging apparatus capable of suppressing influence of temporal variation in the temperature of a metal shim on imaging.SOLUTION: A magnetic resonance imaging apparatus 100 includes a gradient magnetic field coil 103, a metal shim, a setting part 133b and a sequence control unit 120. The gradient magnetic field coil 103 applies a gradient magnetic field in a magnetostatic field where a subject P is placed. The metal shim provided on the gradient magnetic field coil 103 corrects a spatial unevenness of the magnetostatic field. The setting part 133b sets a protocol execution pattern on the basis of a temperature variation model indicating a temporal variation in the temperature of the gradient magnetic field coil 103. The sequence control unit 120 executes the protocol according to the pattern set by the setting part 133b.SELECTED DRAWING: Figure 1