Abstract The reinforced efficiency of steel fibers in composites is closely related to their spatial orientation, which can be generally driven by the external magnetic force and restricted by the wall effect of rigid boundaries of the container. To clarify the spatial orientation of steel fibers in composites considering the effect of rigid boundaries under the electromagnetic field, a series of two-phase models consisting of fibrous particles and homogeneous matrix are generated, in which the fibers are separately simplified as spherocylindrical, cylindrical, and linear particles. Based on these models of the semi-periodic boundaries, the effect of fiber characteristics (e.g., the fiber content V f, fiber aspect ratio ε, fiber length l sf, and fiber style) on both the spatial distribution and orientation degree of fibrous particles is studied before and after the fibers are aligned by the magnetic force. The results revealed that (1) both the effective number N A and orientation degree ξ of fibrous particles at a cross-section of the container can be greatly increased when the electromagnetic field is applied and (2) the wall effect of rigid boundaries shows an adverse impact on the amelioration of N A and ξ, and the range size of the affected region is essentially equal to the effective length of fibrous particles of different shapes (e.g., l sf + D sf) for spherocylindrical particles and l sf for cylindrical and linear particles).