To solve the path planning problem for unmanned boats in island and reef areas, this paper introduces an adaptive heuristic function specifically for island and reef areas based on the traditional A* algorithm, in order to effectively handle the obstacle avoidance problem. A new cost function is designed to balance the relationship between path length and safety. The sea chart is converted into a path planning map by using the grid method, and the path planning is carried out. The paper compares the performance of the new path-planning algorithm with other path-planning algorithms through experiments, and the improved A* algorithm for global path planning of unmanned boats in island and reef areas shows excellent performance in various complex environments, effectively improving the island and reef area navigation efficiency.