New energy storage methods based on electrochemistry can not only participate in peak shaving of the power grid but also provide inertia and emergency power support. It is necessary to analyze the planning problem of energy storage from multiple application scenarios, such as peak shaving and emergency frequency regulation. This article proposes an energy storage capacity configuration planning method that considers both peak shaving and emergency frequency regulation scenarios. A frequency response model based on emergency frequency regulation combined with low-frequency load shedding is established, taking into account the frequency safety constraints of the system and the principle of idle time reuse, to establish a bi-level programming model. In the upper-level model, the optimization objective is to minimize the annual operating cost of the system during the planning period, combined with the constraints of power grid operation to plan the energy storage capacity. The lower-level model embeds frequency safety constraints with the optimization objective of minimizing the cost of fault losses. To solve the bi-level optimization problem, the Karush–Kuhn–Tucher (KKT) condition and Big-M method were used to transform the bi-level model into a single-layer linear model. Finally, an improved IEEE RTS-24 system was used for numerical verification. The results show that the method proposed in this article can reasonably plan the capacity of energy storage, improve frequency safety during system operation, and reduce the operating cost of the power grid.