Mobile robot path planning is a key technology and challenge in robot automation field. For a long time, particle swarm optimization has been used in path planning, while the well-known shortcomings such as local minimum, premature and low efficiency have prevented its extensive application. In this article, an improved localized particle swarm optimization algorithm is proposed to address these problems. Firstly, the improvements in inertia weights, acceleration factors, and localization prevent the algorithm falling into a local minimum value and increase convergence speed of the algorithm. Then, fitness variance is used to measure the diversity of particles, and increasing of diversity can help to overcome the shortcoming of premature. Particle’s diversity is increased by the defined extended Gaussian distribution. Finally, the smoothing principle is applied in path planning. In the process of simulation experiments and real-world validations, our proposed method is compared with the basic particle swarm optimization and A-star method in four simulation scenarios and four real-world maps, and the comparative study show that the proposed algorithm outperforms as well as particle swarm optimization and A-star algorithms in terms of path length, running time, path optimal degree, and stability. Finally, the related results demonstrate that the proposed method is more effective, robust and feasible for mobile robot path planning.