Unsteady numerical simulation and visual experiment are used to reveal the formation mechanism of the roof-attached vortex (RAV) on the roof of the closed sump of a pumping station. The results show that RAVs mainly occur between the pump device and the rear wall of the closed sump. In the 10th period of impeller rotation, there are 2 RAVs at the roof. V1 (Vortex 1 in numerical simulation) is located directly behind the water pump unit, and V2 (Vortex 2 in numerical simulation) is close to the right wall. Significantly, the vorticity intensity at the V1 vortex core increases with the rotation of the impeller. Vtest1 (Vortex 1 in test) and Vtest2 (Vortex 2 in test) are two RAVs observed in the experiment, which are highly consistent with the unsteady numerical simulation V1 and V2. Comparing the vorticity intensity of the roof, rear wall, and sidewall, it can be seen that the maximum vorticity intensity on the roof is more significant than that on the rear wall and both sides of the wall. The roof is more likely to induce vortex. When the RAVs on the roof occur, the pressure in the middle of the bell mouth is lower than that on the sidewall, and the velocity is higher. At 2/5 T, the blade is in the low-pressure zone. The velocity distribution uniformity and velocity weighted average angle at the bell mouth also decreased. The RAVs enter the pump after being generated, which is the most harmful to the safe and stable operation of the pump. The study can provide theoretical guidance for the optimal design of the closed sump.