The proportion of renewable energy sources in the power generation has gradually increased. However, due to the variation and intermittency of renewable energy sources such as wind and solar energy, energy storage system must be integrated in the microgrid to ensure the power balance between the load and the generating end. At the same time, economic benefits must be considered due to the introduction of energy storage systems. Secondary utilization of power batteries is considered to be an effective solution to the above-mentioned problems. This paper proposes an energy storage management system composed of second life batteries. Comprehensively considering battery lifetime loss costs and system operating costs, and to conduct the dispatch of energy in the lowest cost way. Considering battery degradation, remaining capacity, and cost, and comparing the performance of second life batteries with new batteries. Based on simulation results, the effectiveness of the method is verified.