The scheme of “centralized charging, unified distribution” is one of the most important charging modes for electric vehicle industry. Under the premise of considering the purchase of charging infrastructure, it takes into account of electricity purchase cost and initial purchase batteries cost, built an optimal allocation model of centralized charging station with taking the minimum cost of investment as the objective and the electric vehicle battery replacement demand as the major constraint, in order to improve the economy of centralized charging station planning and construction. Based on peak and valley time of electricity price mechanism , optimizing the distribution plan to increase the recycling rate of the batteries, achieving the decrease of the battery number and load peak and off-peak difference. The optimal capacity allocation results of the charging station and the charging strategy of the batteries in each period are obtained by using Lingo software. The validity of the model is verified by a numerical example, The sensitivity analysis shows that the division way of peak and valley price is the key factor to the capacity allocation of the centralized charging station.