This paper presents a data-driven virtual inertia control method for doubly fed induction generator (DFIG)-based wind turbine to provide inertia support in the presence of frequency events. The Markov parameters of the system are first obtained by monitoring the grid frequency and system operation state. Then, a data-driven state observer is developed to evaluate the state vector of the optimal controller. Furthermore, the optimal controller of the inertia emulation system is developed through the closed solution of the differential Riccati equation. Moreover, a differential Riccati equation with self-correction capability is developed to enhance the anti-noise ability to reject noise interference in frequency measurement process. Finally, the simulation verification was performed in Matlab/Simulink to validate the effectiveness of the proposed control strategy. Simulation results showed that the proposed virtual inertia controller can adaptively tune control parameters online to provide transient inertia supports for the power grid by releasing the kinetic energy, so as to improve the robustness and anti-interference ability of the control system of the wind power system.