This paper presents the numerical investigation and optimization of the operating parameters of the in situ generated CO2 Huff-n-Puff method with compound surfactant on the performance of enhanced oil recovery. First, we conducted experiments of in situ generated CO2 and surfactant flooding. Next, we constructed a single-well radial 3D numerical model using a thermal recovery chemical flooding simulator to simulate the process of CO2 Huff-n-Puff. The activation energy and reaction enthalpy were calculated based on the reaction kinetics and thermodynamic models. The interpolation parameters were determined through history matching a series of surfactant core flooding results with the simulation model. The effect of compound surfactant on the Huff-n-Puff CO2 process was demonstrated via a series of sensitivity studies to quantify the effects of a number of operation parameters including the injection volume and mole concentration of the reagent, the injection rate, the well shut-in time, and the oil withdrawal rate. Based on the daily production rate during the period of Huff-n-Puff, a desirable agreement was shown between the field applications and simulated results.