In the light of the problem of premature convergence and local convergence in particle swarm optimization (PSO), a clustering coefficient (λ) and a boundary restriction equation are introduced in the model of PSO at first. And a PSO with cyclical migratory behavior (CMPSO) is proposed based on the optimization of particles' work model. And then, the two parameters' characteristics of CMPSO, N which represents migration cycle and K which represents total number of iterations, are tested on benchmark functions. Finally, CMPSO is used to calculate the slope instability risk of Chengbi River Reservoir Earth-Rock Dam. The result shows that CMPSO has a significant increase at speed and precision in calculation compared with PSO, and needs fewer particles. Compared to the result of Monte-carlo simulation, CMPSO also has higher accuracy than PSO in the calculation of slope instability risk.