This shimming device sequentially records a history of conducted shim setting, momentarily dynamically calculates compensation values corresponding to the record by the aid of a characteristic function, and dynamically controls the shim coil by the aid of the compensation values thus obtained, to thereby compensate the magnetic field fluctuation of the superconducting magnet which is attributable to the setting of the shim, and stabilizes the magnetic field, in an NMR superconducting magnet. This device includes shim setting recording means (230) that records a set value of the shim, a type of set operation, the operation amount of the setting, and a time at which the setting is conducted, in association with each other for each setting generating compensation function supply means (210) that supplies a generating compensation function that is a function having the type of the operation, the operation amount, and the amount of time as factors, and is set so as to approximately compensate a magnetic field fluctuation attributable to individual setting compensation value computing means (240) that refers to the generating compensation function supply means (210) and the shim setting recording means (230), computes a compensation value at the time t by the aid of a compensation function configured by those means, and outputs the computation result shim coil driving means (300) that drives the shim coil (400) by the aid of a sum of the compensation value obtained by the compensation value computing means (240), and a latest set value.