Route planning is the key to safe, efficient and intelligent navigation of maritime traffic. Autonomous route planning is a complex optimization problem, which requires both global route planning and local collision avoidance. In this paper, we propose an optimization algorithm which can consider both global route planning and local collision avoidance. Firstly, nonlinear constraint optimization models of obstacle limitation, safe water depth limitation and ship steering limitation are established. Then, the PE-A * algorithm and route planning framework are proposed by using potential energy field to accurately express the environment. Finally, the safety and feasibility of the route planned by PE-A * algorithm are discussed through simulation experiments. Simulation results show that PE-A * algorithm can realize both global route planning and local collision avoidance, and the safety and feasibility of the planned route are greatly improved. From the perspective of potential energy, this work proposes an automatic route planning algorithm and establishes a flexible mathematical model, which can add fuel consumption, time and other related engineering requirements into the model to plan the optimal route meeting the requirements.INDEX TERMS Ship, potential energy, A * algorithm, route planning.