Green storage plays a key role in modern logistics and is committed to minimizing the environmental impact. To promote the transformation of traditional storage to green storage, research on the capacity allocation of wind-solar-storage microgrids for green storage is proposed. Firstly, this paper proposes a microgrid capacity configuration model, and secondly takes the shortest payback period as the objective function, and uses the improved sparrow search algorithm (ISSA) for optimization. Firstly, the Logistic-Tent compound chaotic mapping method is added to the population initialization of the sparrow search algorithm (SSA). Secondly, the adaptive t-distribution mutation is used to improve the discoverer, and the overall optimization ability of the algorithm is improved. Finally, the hybrid decreasing strategy is adopted in the process of vigilance position update. The ISSA can improve the search efficiency of the algorithm, avoid premature convergence and enhance the robustness of the algorithm, which is helpful to better apply to the optimal configuration of wind-solar-storage microgrid capacity in green storage. By analyzing the optimal capacity allocation results of two typical days, the system can better adapt to the dynamic storage requirements and improve the flexibility and sustainability of the supply chain.