In order to solve the problem of unit commitment caused by the fluctuation and randomness of wind farm output, a two-stage distributionally robust optimization model of unit commitment with energy storage based on KL divergence is proposed. Firstly, based on the operation model of battery energy storage system, the battery energy storage system model is embedded into the traditional thermal power unit commitment model, and a two-stage optimization model of unit commitment with battery energy storage system is established; Then, the fuzzy set of wind farm output is constructed based on KL divergence, and a two-stage distributionally robust optimization model of unit commitment with battery energy storage system is formed. It is transformed into a mixed integer convex optimization model which is easy to solve by dual transformation and generalized Benders decomposition. Finally, the simulation results of IEEE RTS 24 bus system show that the proposed distributionally robust optimization method is more conservative than the robust optimization method, and its economy is close to the stochastic optimization method. With the increase of KL divergence, the unit commitment cost increases slowly.