A high-quality image is obtained using a two-dimensional selective excitation method even if the static magnetic field is not uniform. Therefore, non-uniformity of a static magnetic field of a region to be focused in particular in a selective excitation region excited by 2DRF is measured, and a result of the measurement is reflected in an imaging sequence using the 2DRF. For example, a resonance frequency of magnetization obtained from the measurement result is set as an irradiation frequency of the 2DRF. In addition, a shim gradient magnetic field is applied so as to correct the non-uniformity of the magnetization obtained from the measurement result. These are applied only in the imaging sequence using the 2DRF, and an irradiation frequency and a shim gradient magnetic field set in a conventional method are used in other imaging sequences.