In this paper, we propose the usage of an ensemble learning approach for predicting total electron content (TEC). The training data set spans from 2007 to 2016, while the testing data set is set to the year 2017. The model inputs in our study included Solar radio flux (F107), Solar Wind plasma speed, By, Bz, Dst, Ap, AE, day of year, universal time, 30‐day and 90‐day TEC averages. Specifically, eXtreme Gradient Boosting (XGBoost), Gradient Boosting Decision Tree, and Decision Tree were utilized for 1‐hr TEC prediction at high‐ (80°W, 80°N), mid‐ (80°W, 40°N), and low‐ latitudes (80°W, 10°N). Results indicate that all three models performed well in predicting TEC, with a mean error of only approximately 0.6 TECU at high‐ and mid‐ latitudes and 1.13 TECU at low latitudes. At the same time, we compared the model with 1‐day Beijing University of Aeronautics and Astronautics model during the period of magnetic storm from 25 August 2018 to 27 August 2018 and a quiet period from 13 December 2018 to 15 December 2018. In the magnetic storm period, Our model showed an average reduction of 1.83 TECU compared to BUAA model. During the quiet period, XGBoost exhibit an average error that is 1.14 TECU lower than that of BUAA model. Moreover, TEC prediction over the region between the 20°N–45°N and 70°E−120°E during geomagnetic storm has an error of 2.74 TECU, showing the stability and superiority of XGBoost. Overall, the ensemble learning approach exhibits its advantage in predicting TEC. Plain Language Summary: Due to the impact of the ionosphere on the propagation of radio waves and its significant influence on global navigation satellite systems, we have conducted modeling of the ionospheric total electron content (TEC), which describes the morphology and structure of the ionosphere. We propose the use of eXtreme Gradient Boosting (XGBoost), Gradient Boosting Decision Tree, and Decision Tree to predict TEC in different geographical latitudes. We also evaluate the best prediction time of the XGBoost model in a day. Additionally, the XGBoost model was tested during a geomagnetic storm, and TEC prediction over the region between 20°N and 45°N and 70°E−120°E showed the average error of 2.74 TECU, indicating its stability and superiority. Key Points: Three ensemble learning models are employed to predict total electron content (TEC) in various latitudes using data spanning a solar cycleeXtreme Gradient Boosting model has less predicted errors than Gradient Boosting Decision Tree and Decision Tree models, and the previous TEC history dominants the predicted TEC valuesThe RMSE increases with the predicted time advance, and the average relative error is the minimum in the mid‐latitude [ABSTRACT FROM AUTHOR]