Direct numerical simulations are performed to investigate the flow past a transversely rotating sphere confined in a pipe. Three sphere diameters of d=0.2D, 0.5D, and 0.8D (D is the pipe diameter) and sphere Reynolds numbers (based on the sphere cross-sectional mean velocity and d) of Res=250–500 are considered. The simulation results highlight the combined effects of the blockage ratio (BR=d/D) and the nondimensionalized rotation rate Ω in the range of 0.2–1.2 on the wake flow. For each BR, with increasing Res and Ω, the wake flow undergoes a transition of the flow pattern from steady symmetry and unsteady symmetry to unsteady asymmetry. For BR=0.2, the variation in flow behaviors with Ω is similar to those reported in the previous studies on a transversely rotating sphere subjected to a uniform flow. With increasing BR from 0.2 to 0.5, the unsteady asymmetric wake flow is characterized by distorted near-wake vortex rings and a series of staggered inward rolled-up vortex arcs on the double streamwise vortex threads, which results in a low-frequency modulation of the unsteady wake flow. These rolled-up vortex arcs are connected with downstream quasi-streamwise vortices and form hairpin-like vortices. Dynamic Mode Decomposition (DMD) analysis shows that the distorted near-wake vortex rings are associated with the antisymmetric DMD mode at the adjacent frequency around the symmetric primary DMD mode. With BR=0.8, there is a drastic increase in the sphere's force coefficients. A more complex wake flow behavior is found due to a strong interaction between the wake flow and the near-pipe-wall flow. At Ω=1.2, dominant asymmetric flow structures are characterized by impingement of the vortex filaments. The low-frequency modulation of these wake structures is also analyzed using the DMD analysis.