The invention relates to a capacitor optimization configuration method based on an improved particle swarm optimization. The method comprises the following steps of S1, establishing a target functionwith improved voltage quality; S2, establishing a target function with reactive compensation reaching the standard; S3, establishing a target function with the total harmonic distortion rate reachingthe standard; S4, establishing a target function of parallel resonance frequency and series resonance frequency; and S5, establishing a multi-objective optimization model, and carrying out optimizingand configuring on the capacitor by adopting a particle swarm algorithm. Under the condition that resonance and voltage fluctuation are considered, the improved particle swarm algorithm is adopted, the inertia coefficient of the system is controlled by means of the method of presenting the linear descent along with the number of iterations, so that the algorithm can have high global searching performance when starting, the vicinity of the global optimum region can be quickly located, and meanwhile, high local searching performance is achieved; the established optimization model is not only applicable to electric power companies, the capacitor optimization configuration method based on an improved particle swarm optimization and other levels of power transmission and distribution managementdepartments, and is also suitable for a large-scale steel plant, a cement plant and other important harmonic source users.