Virtual energy storage control in DC microgrid can significantly improve the supporting capacity of source-storage-load collaborative grid connection. This paper first analyzes the energy conversion relationship between controllable load, the energy contained in the fan and capacitor storage capacity, and establishes the virtual energy storage model derived from controllable load and fan respectively. Secondly, based on virtual energy storage control, an economic optimization strategy for DC microgrid is proposed, which takes into account load income, energy storage loss cost and wind abandoning cost. On this basis, under the coordinated control of source and storage of DC microgrid, particle swarm optimization algorithm is used to optimize the design of virtual capacitance values in different periods of time to improve the economic benefits of the system. Finally, MATLAB is used for example analysis to verify that after classifying the fan and controllable load into virtual energy storage, the charge-discharge characteristics similar to those of energy storage equipment could be simulated, which is conducive to improving the energy management ability and operation economy of the system.