In the path planning of mobile robot moving from its own position to the target point, the traditional A-star algorithm is widely used as the most popular path planning algorithm in robots. However, there are many redundant inflection points in the path planned by the traditional algorithm, and the path length is long. The large peak path at the inflection point is not smooth enough, which leads to the problem of path safety. To solve the above problems, an improved A-star algorithm is proposed. Firstly, the evaluation function of the traditional algorithm is improved, and the weights of different regions are added, so that the path planned by the improved algorithm is shorter and the efficiency is higher. Secondly, the redundant points in the generated path are optimized to further shorten the path length. Finally, the tangent method is used to make the overall path smoother at the inflection point, which improves the safety and stability. Finally, the simulation experiment is carried out in matlab to verify the effectiveness of the algorithm. The simulation results show that the improved algorithm shortens the path length by 4.68 %, reduces the number of inflection points, and the path at the inflection point is smoother. Optimized the path.