The introduction of cavitation effect in ultrasonic surface rolling can further improve the strengthening effect, but the mechanism of cavitation ultrasonic surface rolling time-space bubble collapse on the material wall is still uncertain. Therefore, in this work, the shock wave produced by the spherical bubble collapse and the microjet produced by the non-spherical bubble collapse in cavitation ultrasonic surface rolling were investigated. The dynamics model of the spherical bubble collapse in the ultrasonic surface rolling area was established, and the shock wave pressure on the wall surface produced by the spherical bubble collapse was obtained through numerical analysis. Additionally, the pressure distribution on the wall surface produced by the near-wall non-spherical bubble collapse was determined using the computational fluid dynamics analysis method. Finally, cavitation erosion experiments were conducted. The results show that the shock wave generated by the collapse of a spherical bubble plays a dominant role in cavitation ultrasonic surface rolling, while the microjet generated by the collapse of a non-spherical bubble is negligible. These research findings are important for further studies on the formation of residual stresses and microstructure evolution in cavitation ultrasonic surface rolling.