When intelligent mobile robots perform global path planning in complex and narrow environments, several issues often arise, including low search efficiency, node redundancy, non-smooth paths, and high costs. This paper proposes an improved path planning algorithm based on the rapidly exploring random tree (RRT) approach. Firstly, the target bias sampling method is employed to screen and eliminate redundant sampling points. Secondly, the adaptive step size strategy is introduced to address the limitations of the traditional RRT algorithm. The mobile robot is then modeled and analyzed to ensure that the path adheres to angle and collision constraints during movement. Finally, the initial path is pruned, and the path is smoothed using a cubic B-spline curve, resulting in a smoother path with reduced costs. The evaluation metrics employed include search time, path length, and the number of sampling nodes. To evaluate the effectiveness of the proposed algorithm, simulations of the RRT algorithm, RRT-connect algorithm, RRT* algorithm, and the improved RRT algorithm are conducted in various environments. The results demonstrate that the improved RRT algorithm reduces the generated path length by 25.32% compared to the RRT algorithm, 26.42% compared to the RRT-connect algorithm, and 4.99% compared to the RRT* algorithm. Moreover, the improved RRT algorithm significantly improves the demand for reducing path costs. The planning time of the improved RRT algorithm is reduced by 64.96% compared to that of the RRT algorithm, 40.83% compared to that of the RRT-connect algorithm, and 27.34% compared to that of the RRT* algorithm, leading to improved speed. These findings indicate that the proposed method exhibits a notable improvement in the three crucial evaluation metrics: sampling time, number of nodes, and path length. Additionally, the algorithm performed well after undergoing physical verification with an insect-like mobile robot in a real environment featuring narrow elevator entrances.