To accelerate the integration of fluctuating renewable energy technologies in the power systems, it is necessary to increase the flexibility of hydropower by operating turbines at off-design conditions. Unfortunately, this strategy causes deleterious flow phenomena such as von Kármán’s vortices at the wake of the vanes and/or blades. When their shedding frequency lies in the vicinity of a structure’s natural frequency, lock-in occurs and vibration amplitudes increase significantly. Moreover, if cavitation occurs at the centers of these vortices, the structure’s dynamic response will be modified. In order to understand this interaction and to avoid its negative consequences, the vibration behavior of a NACA 0009 hydrofoil under a torsional lock-in condition was numerically simulated for cavitation-free and cavitating-flow conditions. The results showed that the presence of vortex cavitation modified the formation and growth process of shed von Kármán vortices in the near-wake region which, in turn, caused an increase of the work performed by the hydrofoil deformation on the surrounding flow and a sharp decrease of the maximum vibration amplitude under resonance conditions.