In order to plan robot path in dynamic environment with different types of obstacles, an improved particle swarm optimization (PSO) algorithm based on neural network was proposed, where neural network was used to model the environment and quickly complete collision detection of dynamic obstacles.Through inertia weight and cubic spline path smoothing, the convergence speed of the algorithm was improved with low coding dimension of particles, while maintaining the path accuracy and avoid falling into local optimum in the later stage.Simulation results show that the neural network can unify the environmental representation and the collision detection model of static and dynamic obstacles, the improved PSO algorithm can quickly plan smooth collision free paths under both static and dynamic environments, with shorter path length and fewer iterations. © 2021, Editorial Board of Journal of Huazhong University of Science and Technology. All right reserved.