With the development of the active distribution network, the demand side response has been widely used as an important controllable resource of the distribution network, which can effectively improve the ability of the distribution network to absorb distributed power. Meanwhile, the large-scale access of distributed generation will greatly change the timing characteristics of the net load, so the planning scheme of distributed generation must also be considered in the design of the demand side response mechanism. In the existing research results of distributed generation planning, the electricity price optimization strategy has not been considered in the same time, and it is difficult to fully reflect the impact of the demand response on the distributed generation planning scheme. For this reason, this paper proposes a two-layer optimization model of time-of-use electricity price and distributed generation planning. Firstly, combined with the electricity price elasticity matrix, a demand side response model considering the uncertainty of user response behavior is constructed. Secondly, a two-layer coordination optimization model of distributed generation planning scheme and time-of-use electricity price schemes is proposed, and the discrete particle swarm optimization method is proposed to solve the model. Finally, the result shows that the coordinated optimization of distributed generation and electricity prices can improve the utilization rate of distributed power output, promote the access of distributed power, and reduce the operating cost of the distribution network.