Carbon dioxide (CO2) foam flooding has been shown to enhance oil recovery. However, large‐scale adoption has been restricted by issues with transportation of CO2 and equipment corrosion. In situ CO2 foam generation can possibly overcome these issues. In this article, a CO2 sustained‐release system was first optimized for the CO2 production rate and production efficiency. Then, the dissolution capacity and plug‐removing ability of the sustained‐release system were evaluated. Visual experiment and parallel sand pack flooding tests were conducted to verify the formation, propagation of in situ CO2 foam, and the feasibility of this technique. The results indicated that the sustained‐release system had benign ability to lower injection pressure and improve injectability. Moreover, in situ CO2 foam flooding could obtain high oil recovery due to favorable mobility control ability, interfacial tension reduction capacity, and heterogeneity improvement. All the experiments demonstrated that the in situ CO2 foam technique has great potential for enhanced oil recovery in the Bohai oilfield.