AC/DC hybrid ultra-high voltage (UHV) transmission network is an effective way to deliver large scale renewable energy. Unfortunately, the power transmission capacity is significantly restricted due to guaranteed transient stability. Energy storage systems (ESS) are regarded to be the most flexible means to enhance transient stability. However, optimal planning of ESS for UHV stability is challenge because it involves differential equations. For this, this paper firstly proposes the mathematic formulations for optimal planning of ESS with UHV transient stability. The proposed model considers the DC blocking fault that is simulated by component switching equivalent processing. Mathematically, the proposed model belongs to the nonlinear, mix-integer, discontinuous differential constrained programming. The existing simulation and numerical methods are challenging to solve the proposed model directly. For solving this problem, an effective method is proposed, combining with the methods of implicit trapezoidal integral method, sensitivity analysis method and interior point method. The simulation results show that ESS can enhance the transmission efficiency of UHV transmission lines. From the analysis of delivery capacity, voltage distribution, the generator rotor relative swing angle and angular velocity, the technical benefit can be maximized by optimal planning ESS with the proposed method.