This note investigates the waypoints-based path following problem of underactuated surface vehicles (USVs), considering that there exists the moving obstacle around the reference path. An improved dynamic virtual ship (DVS) guidance principle is proposed by incorporating the safety prediction obstacle avoidance (SPOA) strategy. In the mechanism, a real-time distance function is established to obtain the distance to closest point of approach (DCPA) and time to closest point of approach (TCPA), which are employed to evaluate the current sailing situation. Then the own ship could choose the corresponding sailing mode: path following mode or obstacle avoidance mode. Especially for the latter one, the velocity and the heading angle orders are taken into account together to generate the reasonable avoidance order, which is consistent with the International Regulations of Preventing Collisions at Sea (COLREGs) and the marine practice. Furthermore, based on the full-state observerable characteristic of the underactuated system, the ESO-based output feedback control algorithm is derived to guarantee the convergence of the own ship to the DVS. And the external disturbance and the model uncertainty are integrated as an augmented variable to be estimated. Besides, all signals in the closed-loop system are ensured to be semi-global uniformly ultimately bounded (SGUUB). The effectiveness and robustness of the proposed scheme are verified by the comparative experiment and the experiment within the simulated ocean environment.