Ultrahigh field systems (≥ 7 T) can increase the signal-to-noise ratio of magnetic resonance imaging (MRI), improving imaging performance compared to systems with lower fields. However, these enhancements heavily rely on a high B0 magnetic field homogeneity level, which can be achieved through superconducting shimming. This paper presents a novel two-stage superconducting shimming method designed to achieve precise shimming for a 7 T MRI superconducting magnet. In the initial stage, detailed measurements and fittings were conducted to determine the current polarity and the axial or circumferential positions of the shim fields. Subsequently, an optimization strategy was implemented to determine the optimal shim currents with a flexible target field. The second stage involves an iterative process to fine-tune the current of a specific shim coil, identified as having the most significant impact on field homogeneity. The overall fitness of 99.5% underscores the precision in determining the current polarity and position of the shim fields. Significantly, the calibrated shim system substantially improves the peak-to-peak and Root Mean Square Error (RMSE) field homogeneities from 107.42 ppm and 37.00 ppm to 11.12 ppm and 3.26 ppm, respectively, representing improvements of 89.65% and 91.19%. Furthermore, the simulation results of the fine-tuning stage demonstrate additional enhancements in peak-to-peak field homogeneity, to 9.9 ppm by reducing the current of the Z2 shim coil by 51.3 mA. Additionally, the shimmed magnetic field exhibited high time stability, with a maximum variation of only 27 µT observed within 48 h. Thus, the proposed two-stage superconducting shimming framework effectively addresses the challenge of imperfect B0 magnetic fields, enhancing peak-to-peak and RMSE field homogeneity. The stepwise optimized approach also mitigates deviations caused by shim-to-shim coupling, demonstrating its efficacy in achieving precise shimming in ultrahigh-field MRI systems.