In the face of increasing demands for tasks such as mountain rescue, geological exploration, and military operations in complex wilderness environments, planning an efficient walking route is crucial. To address the inefficiency of traditional two-dimensional path planning, this paper proposes a two-stage path planning algorithm. First, an improved Probabilistic Roadmap (PRM) algorithm is used to quickly and roughly determine the initial path. Then, the morphological dilation is applied to process the grid points of the initial path, retaining the surrounding area of the initial path for a precise positioning of the search range. Finally, the idea of the A∗ algorithm is applied to achieve precise path planning in the refined search range. During the process of constructing the topology map, we utilized parallelization acceleration strategies to expedite the graph construction. In order to verify the effectiveness of the algorithm, we used terrain data to construct a wilderness environment model, and tests were conducted on off-road path planning tasks with different terrains and distances. The experimental results show a substantial enhancement in the computational efficiency of the proposed algorithm relative to the conventional A∗ algorithm by 30 to 60 times.