Tuberculosis (TB) is a disease resulting from a bacterial infection caused by Mycobacterium tuberculosis (MTB), posing a significant global health challenge due to its status as one of the leading causes of death, particularly among individuals co-infected with HIV. There are 1.7 deaths per 100,000 due to HIV/TB co-infection. Early detection methods for TB, such as the Xpert MTB/RIF test, still suffer from low sensitivity, leading to inconsistent diagnoses in various cases. This underscores the need for improved automatic MTB detection methods in TB patients, with a particular focus on those co-infected with HIV/TB. This study aims to implement the camel algorithm to identify features in creating predictive models and three ensemble methods: Random Forest (RF), Adaptive Boosting (AdaBoost), and Extreme Gradient Boosting (XGBoost) to identify TB specifically in HIV patients. Hyperparameter tuning is conducted to enhance the model’s performance. Based on our findings, the model developed using the XGBoost method outperformed other models, with accuracy and F1-Score values of 0.89 and 0.75, respectively.