With the increasing capacity of new energy in the power system, new energy cannot provide support for the system frequency directly. This characteristic of new energy affects the frequency stability of the power system. Therefore the control strategy of a virtual synchronous generator (VSG) is proposed to improve the frequency stability of the system. An adaptive virtual inertia control strategy based on an improved bang-bang control strategy for a micro-grid is presented. On one hand, it can make full use of the variability of virtual inertia to reduce dynamic frequency deviation. On the other hand, the steady-state interval of frequency and the steady-state inertia are set to improve the system frequency stability. Then the stability analysis of the value range of the virtual inertia is performed by the small signal model of the VSG for the micro-grid. Meanwhile, the ranges of virtual inertia and steady-state inertia are determined. Finally, Matlab/Simulink is applied to accomplish simulation experiments to compare various virtual inertia control strategies. The results indicate the effectiveness of the proposed strategy.