The economic dispatch (ED) problem aims to minimize the total generation cost while satisfying certain constraints, such as valve-point effects, multi-fuel options, prohibited operating zones, transmission losses, and ramp rate limits. In this paper, these constraints are considered simultaneously for the first time, resulting in a complex nonconvex ED problem. A diversity-based parallel particle swarm optimization (DPPSO) is proposed to solve the nonconvex ED problem, where the implementation details—such as evaluation function design, particle definition, and equality and inequality handling strategies—have been carefully discussed. In our approach, the population of DPPSO is divided into different groups to maintain diversity in particles so that the optimization capacity can be enhanced. An asynchronous information–sharing mechanism (AISM) helps decrease the population size. Hence, the computational burden is reduced. Moreover, information in different groups is calculated parallelly and updated asynchronously to improve computational efficiency. Benchmark functions are employed to demonstrate the effectiveness of the proposed method. Furthermore, three nonconvex ED problems are resolved by the proposed method, and state-of-the-art performance has been achieved. In addition, the proposed algorithm is highly modular, making it easy to unite other salient variants of particle swarm optimization (PSO) to improve its performance.