As an efficient enhanced oil recovery (EOR) technique, carbon dioxide (CO2) miscible flooding can greatly reduce the viscosity of oil and improve its mobility, and has great potential to achieve higher oil recovery. However, the disadvantage of CO2 flooding, when compared with waterflooding, is the relatively larger viscosity ratio between CO2 and oil. Under such unfavorable conditions, frontal instabilities, or viscous fingering, can easily develop. This may affect the performance of CO2 msicible flooding and result in less sweep efficiency and oil recovery. In the present study, nonlinear numerical simulations were conducted to model the CO2 miscible flooding in subsurface porous media. Both concentration-dependent diffusion and a varying dispersion that is closely related with flow rates were incorporated into the mathematical model. The development of frontal instabilities with time was simulated with highly accurate numerical methods. More importantly, to reduce the unstable displacement and improve sweep efficiency, a time-dependent injection rate involving periodic alternation of injection and extraction was employed. Different from the widely used constant injection rate, this time-dependent displacement rate led to different flow dynamics and sweep efficiency, although the amount of CO2 injected was the same. In particular, the effect of a cycle period on the propagation of CO2 was carefully examined. It was found that a longer period led to earlier breakthrough of CO2 and less sweep efficiency. However, a shorter period with faster alternation of injection and extraction had a stabilizing effect. In particular, a later breakthrough was achieved and higher sweep efficiency at breakthrough was obtained compared with that of a constant injection rate. This indicates that pulsed displacement through fast switching of injection and extraction has the potential to maximize oil recovery in CO2 miscible flooding.