CO2 flooding is a pivotal technique for significantly enhancing oil recovery in low-permeability reservoirs. The movement and sweeping rules at the front of CO2 flooding play a critical role in oil recovery; yet, a comprehensive quantitative analysis remains an area in need of refinement. In this study, we developed 1-D and 2-D numerical simulation models to explore the sweeping behavior of miscible, immiscible, and partly miscible CO2 flooding patterns. The front position and movement rules of the three CO2 flooding patterns were determined. A novel approach to the contour area calculation method was introduced to quantitatively characterize the sweep coefficients, and the sweeping rules are discussed regarding the geological parameters, oil viscosity, and injection–production parameters. Furthermore, the Random Forest (RF) algorithm was employed to identify the controlling factor of the sweep coefficient, as determined through the use of out-of-bag (OOB) data permutation analysis. The results showed that the miscible front was located at the point of maximum CO2 content in the oil phase. The immiscible front occurred at the point of maximum interfacial tension near the production well. Remarkably, the immiscible front moved at a faster rate compared with the miscible front. Geological parameters, including porosity, permeability, and reservoir thickness, significantly impacted the gravity segregation effect, thereby influencing the CO2 sweep coefficient. Immiscible flooding exhibited the highest degree of gravity segregation, with a maximum gravity segregation degree (GSD) reaching 78.1. The permeability ratio was a crucial factor, with a lower limit of approximately 5.0 for reservoirs suitable for CO2 flooding. Injection–production parameters also played a pivotal role in terms of the sweep coefficient. Decreased well spacing and increased gas injection rates were found to enhance sweep coefficients by suppressing gravity segregation. Additionally, higher gas injection rates could improve the miscibility degree of partly miscible flooding from 0.69 to 1.0. Oil viscosity proved to be a significant factor influencing the sweep coefficients, with high seepage resistance due to increasing oil viscosity dominating the miscible and partly miscible flooding patterns. Conversely, gravity segregation primarily governed the sweep coefficient in immiscible flooding. In terms of controlling factors, the permeability ratio emerged as a paramount influence, with a factor importance value (FI) reaching 1.04. The findings of this study can help for a better understanding of sweeping rules of CO2 flooding and providing valuable insights for optimizing oil recovery strategies in the field applications of CO2 flooding.