We study the ground-state phases of two-dimensional rotating spin–orbit coupled spin-1/2 Bose–Einstein condensates (BECs) in a gradient magnetic field. The competition between gradient magnetic field, spin–orbit coupling and rotation leads to a variety of ground-state phase structures. In the weakly rotation regime, as the increase of gradient magnetic field strength, the BECs experiences a phase transition from the unstable phase to the single vortex-line phase. The unstable phase presents the vortex lines structures along the off-diagonal direction. With magnetic field gradient strength increasing, the number of vortex lines changes accordingly. As the magnetic field gradient strength increases further, the single vortex-line phase with a single vortex line along the diagonal direction is formed. The phase diagram shows that the boundary between the two phases is linear with the relative repulsion λ ≥ 1 and is nonlinear with λ < 1. In the relatively strong rotation regime, in addition to the unstable phase and the single vortex-line phase, the vortex-ring phase is formed for the strong magnetic field gradient and rapid rotation. The vortex-ring phase shows the giant and hidden vortex structures at the center of ring. The strong magnetic field gradient makes the number of the vortices around the ring unchanged.