The estimated ultimate recovery (EUR) of a single well must be predicted to achieve scale-effective shale gas extraction. Accurately forecasting EUR is difficult due to the impact of various geological, engineering, and production factors. Based on data from 200 wells in the Weiyuan block, this paper used Pearson correlation and mutual information to eliminate the factors with a high correlation among the 31 EUR influencing factors. The RF-RFE algorithm was then used to identify the six most important factors controlling the EUR of shale gas wells. XGBoost, RF, SVM, and MLR models were built and trained with the six dominating factors screened as features and EUR as labels. In this process, the model parameters were optimized, and finally the prediction accuracies of the models were compared. The results showed that the thickness of a high-quality reservoir was the dominating factor in geology; the high-quality reservoir length drilled, the fracturing fluid volume, the proppant volume, and the fluid volume per length were the dominating factors in engineering; and the 360−day flowback rate was the dominating factor in production. Compared to the SVM and MLR models, the XG Boost and the RF models based on integration better predicted EUR. The XGBoost model had a correlation coefficient of 0.9 between predicted and observed values, and its standard deviation was closest to the observed values’ standard deviation, making it the best model for EUR prediction among the four types of models. Identifying the dominating factors of shale gas single-well EUR can provide significant guidance for development practice, and using the optimized XGBoost model to forecast the shale gas single-well EUR provides a novel idea for predicting shale gas well production.