Background: Diabetes is a chronic disease characterized by elevated blood sugar levels. Although it has no permanent cure, early diagnosis can significantly reduce the complications that arise from it. Unlike traditional binary classification, this study employs multicategory classification to distinguish between diabetes, prediabetes, and nondiabetic individuals, allowing for more targeted intervention. This research aims to classify diabetes using machine learning (ML) algorithms with hyperparameter tuning to achieve optimal predictive performance. Methods: The study analyzed data from the Bangladesh Demographic and Health Survey (BDHS) 2017–18. A chi-square test was adopted to identify the significant differences across baseline characteristics with diabetes status. In addition, recursive feature elimination with cross-validation (RFECV) using a random forest (RF) classifier was employed to select the most significant features for model development. Six ML algorithms, including multinomial logistic regression (MLR), naïve Bayes (NB), K-nearest neighbor (KNN), support vector machine (SVM), RF, and gradient boosting machine (GBM) were applied to predict diabetes status among adults. Additionally, the grid search method was employed for hyperparameter tuning to enhance model performance. Classification metrics, such as accuracy, precision, F1-score, Cohen’s kappa, and the area under the receiver operating characteristic (ROC) curve (AUC), were used to evaluate the performance of all models. Delong test was utilized to analyze the significant differences of AUC values of each model. Results: The GBM achieved the highest performance with an accuracy of 74.2%, precision of 66.5%, F1-score of 65.8%, Cohen’s kappa of 0.076, and AUC of 66.2%, outperformed MLR (65.4%), SVM (60.2%), NB (64.1%), KNN (58.5%), and RF (61.9%). Although AUC values were moderate, GBM showed consistent performance across multiple metrics, indicating reliable classification capability. Hyperparameter tuning slightly improved all models, with GBM maintaining superior predictive performance. After tuning the hyperparameter, the GBM yielded an accuracy of 74.4%, precision of 66.5%, F1-score of 65.8%, Cohen’s kappa of 0.079, and AUC value of 66.7%. Conclusions: The GBM model demonstrated superior predictive ability compared to other algorithms in classifying diabetes status among Bangladeshi adults. These findings can support early diabetes risk stratification and guide targeted community-based screening programs, enabling timely interventions and improved disease prevention strategies.