In recent years, CO2 flooding has emerged as an efficient method for improving oil recovery. It also has the advantage of storing CO2 underground. As one of the promising types of CO2 enhanced oil recovery (CO2-EOR), CO2 water-alternating-gas injection (CO2-WAG) can suppress CO2 fingering and early breakthrough problems that occur during oil recovery by CO2 flooding. However, the evaluation of CO2-WAG is strongly dependent on the injection parameters, which in turn renders numerical simulations computationally expensive. So, in this work, machine learning is used to help predict how well CO2-WAG will work when different injection parameters are used. A total of 216 models were built by using CMG numerical simulation software to represent CO2-WAG development scenarios of various injection parameters where 70% of them were used as training sets and 30% as testing sets. A random forest regression algorithm was used to predict CO2-WAG performance in terms of oil production, CO2 storage amount, and CO2 storage efficiency. The CO2-WAG period, CO2 injection rate, and water–gas ratio were chosen as the three main characteristics of injection parameters. The prediction results showed that the predicted value of the test set was very close to the true value. The average absolute prediction deviations of cumulative oil production, CO2 storage amount, and CO2 storage efficiency were 1.10%, 3.04%, and 2.24%, respectively. Furthermore, it only takes about 10 s to predict the results of all 216 scenarios by using machine learning methods, while the CMG simulation method spends about 108 min. It demonstrated that the proposed machine-learning method can rapidly predict CO2-WAG performance with high accuracy and high computational efficiency under conditions of various injection parameters. This work gives more insights into the optimization of the injection parameters for CO2-EOR.