To overcome the premature of particle swarm optimization(PSO) algorithm, an algorithm called particle swarm optimization with local mutation in evolution stagnation cycle(LSPSO) is presented. Concepts of evolution stagnation cycle and recent global best position are proposed, so that particles are influenced by recent global best position instead of global best position, and a random local mutation operation of particles is taken when the evolution of population stagnates. These strategies enrich the diversity of population, extend the search space, and improve the quality of solution. Instead of computing the diversity of population, evolution stagnation cycle is used for lower computing complexity. The simulation results show the reasonability and effectiveness of the algorithm.