SummaryThe promising results of ML (machine learning) methods in various disciplines have led to the frequent use of these methods in health fields such as disease diagnosis, personalized medicine, medical image‐based diagnosis, and predicting the number of deaths and cases in a pandemic. However, a neglected area in the field of healthcare is the lack of study with ML to predict treatment outcomes for tuberculosis (TB) patients, particularly children experiencing failed treatment. This need has become more apparent as the coronavirus pandemic has reversed the gains of health institutions with TB disease, especially in children. Therefore, this article conducted a study using the stacked ensemble ML method to early predict the risk for children experiencing a failed treatment outcome of TB. To fulfill this need and determine the most appropriate technique, a two‐stage methodology was followed in this work. First, predictions were obtained by combining the information gain feature selection (IGFS) approach with a variety of single‐based ML algorithms, including logistic regression (LR), deep belief neural networks (DBN), random forest (RF), and decision tree (DT). Second, the proposed method, which includes a stacked ensemble ML technique, was used. The latter model uses LR as a meta‐learner and the aforementioned single‐based ML algorithms (DBN, LR, RF, and DT). The performance results of ML models used in the two stages were compared, and the proposed model which is the combination of the stack‐based ensemble learning model and the IGFS technique provided better ROC curves, accuracy, precision, and recall results.