Based on the single particle orbital theory and Monte Carlo method, an active shielding analysis method of magnetic field is established. The influences of shielding magnetic field intensity,thickness and structure on shielding effect are analyzed for ideal magnetic field configuration. The results show that the shielding efficiency increases with the magnetic stiffness BL
. When the magnetic stiffness BL
is constant, increasing the magnetic field intensity B
is more effective than increasing the magnetic field thickness L
. For the finite shielding magnetic field configuration,intensified protection is required for the end cover area. The linear shielding magnetic field configurations in the barrel area and the end cover area have the best shielding performance,and can shield 90% of the typical galactic cosmic ray energy spectrum.