In this paper, the influence of rectangular holes with different aspect ratios in a cylinder on shielding properties is investigated using the finite element method. The two indicators used to assess the shielding properties of the cylinder are its internal residual magnetic field and its outer-surface magnetic field map. The internal residual magnetic field ( B) of a cylinder as a function of the aspect ratio of a rectangular hole and its area is simulated, and the conclusions are as follows: with increasing length of the hole, the value of B increases first and then decreases. A cylindrical shield with square holes (the hole aspect ratio is equal to 1) delivers the worst shielding performance. A cylinder with a smaller hole area has better shielding properties, resulting from a less flux leakage from the environmental magnetic field. The anisotropy of the shielding properties is evaluated, and the magnetic shielding in the radial direction is better than that in the axial direction. This research provides a theoretical guide for the application and optimization of magnetic shields.