The path planning problem is an important issue in maritime search and rescue. This paper models the path planning problem as a dynamic vehicle routing problem. It first designs a dynamic generator that transforms the existing benchmark sets for the static vehicle routing problem into dynamic scenarios. Subsequently, it proposes an effective Dynamic Ant Colony Optimization (DACO) algorithm, whose novelty lies in that it dynamically adjusts the pheromone matrix to efficiently handle customers’ changes. Moreover, DACO incorporates simulated annealing to increase population diversity and employs a local search operator that is dedicated to route modification for continuous performance maximization of the route. The experimental results demonstrated that the proposed DACO outperformed existing approaches in generating better routes across various benchmark sets. Specifically, DACO achieved significant improvements in the route cost, serviced customer quantity, and adherence to time window requirements. These results highlight the superiority of DACO in the dynamic vehicle routing problem, providing an effective solution for similar problems.