Existing energy capacity optimization allocation methods have insufficient consideration of energy storage participation in scheduling and the model's complexity with low calculation accuracy. Hence, this paper es-tablishes a two-stage optimization model of wind, solar, and energy storage in the joint planning of energy storage and distributed power supply. Firstly, an objective function is employed to minimize losses and volt-age deviation in the distribution network system. Then, an improved multi-objective particle swarm algo-rithm is used to determine the optimal location and capacity of distributed generation access to the distribu-tion network, introducing a conceptual indicator for voltage magnitude safety to identify alternative nodes and reduce model calculations. Subsequently, energy storage is allocated at the optimal location, and an op-timal dispatch model is established with the economic objective of minimizing the integrated operating cost of wind and solar storage. Finally, the rationality of the model and algorithm is verified using the IEEE33 distribution system as an example. The approach effectively improves the economy of distribution network operation, enhances the voltage quality, and reduces network losses.