The introduction of hybrid energy storage can improve the tie line power of the micro grid. This paper proposes a capacity optimization method of hybrid energy storage system in order to optimize the micro grid tie line power. Firstly, the capacity optimization method for hybrid energy storage is modelled, and the net present value is chosen as the objective function. Then, the problem of hybrid energy storage power allocation is transformed into the problem of determining the frequency of the optimal boundary between different compensation frequency bands, and the genetic algorithm is used to solve this model, after which the optimal capacity of hybrid energy storage is calculated. Finally, a case of a micro grid system in Tianjin eco city shows the effectiveness of the method.