There are few studies on the intelligent guidance of unmanned sailboats, which should coordinate pluralistic tasks at sea in the nature of its maneuvring intractability. To ensure the algorithmic practicability, this paper proposes a path-following and collision-avoidance guidance approach of unmanned sailboats with total formulaic description. The risk-detecting mechanism is fabricated by setting a circular detecting zone and using the time to the closest point of approach. Then, the risk of collision, the path deviation, the speed loss, and the course loss can be judged by constructing the cost functions and applying the distance to closest point of approach. The optimized heading angle is deemed as the one minimizing the aggregate cost functions, which is sought by applying and improving the beetle antennae search (BAS) algorithm. In the proposed modified BAS, the searching step is redesigned to enhance the searching efficiency. To ensure the convergence of the real heading angle to the reference, the backstepping-based control law is fabricated for the high-order sailboat model and in the linear form. The control parameters are offline optimized through the modified BAS. Compared with the adaptive control, this controller can guarantee more computation simplicity and the optimized control performance. Finally, simulation corroborates that the sailboat can successfully complete path following and collision avoidance while encountering multiple static and moving obstacles under the proposed schemes.