Magnetic links between certain coils for high field MRI systems are undesirable but exist. Z2, Z3 and Z2X higher harmonic shim coils are used to homogenize the basic field of ultrahigh field magnet. The inductive coupling may give rise to many problems, such as damaging coils, destroying power sources, and degrading image quality. In order to deal with the inductive coupling, a new decoupling method is proposed, which is from the idea of minimizing the magnetic interaction energy. We derive the theory of magnetic interaction energy between the current filament and conductor sheet to provide a clear understanding of the computation model. We present an optimizing algorithm to design the independent coil, which has minimized mutual inductance with the primary coil. The algorithm is validated by three examples of designing surface coils: the decoupled Z2 coil from a magnet, the decoupled Z3 coil from a Z gradient coil, and the decoupled Z2X coil from an X gradient coil. Besides the surface coils, the theory can be explored to deal with the coupling problem of block coils.