In order to effectively suppress the adverse effects of distributed generation and obtain excess profits, an improved multi-objective particle swarm optimization algorithm is proposed to study the optimal location and capacity of shared energy storage power stations in distribution networks. Firstly, this paper establishes the mathematical model of shared energy storage system, lists the optimization conditions and objective functions, and lists the economic cost calculation of shared energy storage. Secondly, the IEEE 33 bus is studied by using the improved multi-objective particle swarm optimization algorithm. In the example, the access number, location and capacity configuration of the shared energy storage system are determined by minimizing the total economic cost, and the charging and discharging power and energy storage SOC (state of charge) of the optimal access number are emphatically analyzed. Finally, the method of optimal location and capacity of battery energy storage system and the characteristics of calculation examples are summarized. The conclusion shows that the shared energy storage system can effectively suppress the adverse effects of distributed power generation, and the economy is better. When two energy storage systems are connected in the distribution network and 0.5 MW is configured respectively, it is the optimal number of location and capacity configuration.