Avoidance of collisions at sea is crucial to navigational safety. In this paper, we use a distributed algorithm to communicate the entire collision avoidance trajectory information for each ship. In each communication, we suggest a new improvement function considering safety and efficiency to identify the avoidance ship in each cycle. Considering the nonlinear collision avoidance trajectory of ships, a new method for calculating the degree of danger using a velocity obstacle algorithm is proposed. Therefore, in each communication, each ship considers the avoidance behaviours of other ships in planning its avoidance trajectory. Additionally, we combine bi-criterion evolution (BCE) and the ant lion optimiser to plan the entire collision avoidance path. Three scenarios are designed to demonstrate the performance of this method. The results show that the proposed method can find a suitable collision-free solution for all ships.