In order to resolve conflict between convergence speed and population diversity of particle swarm optimization (PSO) algorithm, an improved PSO, called reverse-learning and local-learning PSO (RLPSO) algorithm, is presented in which a reverse-learning behavior implemented by some particles while local-learning behavior adopted by elite particles in each generation. During the reverse-learning process, some inferior particles of initial population and each particle's historical worst position are reserved to attract a particle to leap out of local optimums. Furthermore, the Hamming distance between the inferior particles is set to no less than a default rejection distance the aim of which is to maintain the diversity of population and improve RLPSO's exploration ability. In each generation, the difference between the best particle and the second-best particle is used to guide the best one to carry out local search which is crucial for improving RLPSO's exploitation ability. The results of experiments show that RLPSO has a good global searching ability and convergence speed especially in high dimension function.