In magnetic resonance imaging (MRI) system, the magnetic field homogeneity of the imaging area plays a decisive role in the quality of images. Due to assembly errors or the effects of the surrounding ferromagnetic material, the homogeneity fails to meet the design value, which makes the images deformation, and it is necessary to take measures to shim. Passive shimming uses the magnetization of iron pieces to compensate the magnetic field. In the existing algorithm, the target magnetic field value is fixed, usually the average or DC component of the magnetic field. However, the value is not the best, causing shimming inefficiency or even failure. The optimal target field approach firstly studies the influence law of the placed iron pieces on the magnetic field of a superconducting MRI. Then, the law is used to judge the change trend of the magnetic field and set an optimal target magnetic field value before shimming calculation. The optimal target field approach will reduce the rounds of shimming, improve the efficiency, and quickly improve the homogeneity during optimization.