Here introduced is an optimization design method for actively shielded magnetic resonance image (MRI) superconducting magnet based on the integer linear programming. The feasible coil space is densely divided by an array of candidate squares and, its size is determined by the size of actual superconducting wire. The 0—1 integer linear programming method is adopted to obtain the initial wire concentrated region of coils by comprehensivly considering superconductivity wire consumption, magnetic field intensity inside the superconductors, homogeneity in imaging region and the range of leak fields. Then by reasonably adjusting the position and section size of the wire concentrated region for the next calculation, the final MRI superconducting magnet structure with rectangular section coils is obtained. The method is based on the full size of the superconducting wire, which makes the MRI superconducting magnet design more feasible and has greater advantage for the actual fabriction. With different constraints, the method can also be used for other superconducting magnet design. Finally an example of the MRI magnet optimal design is presented.