Diabetes mellitus (DM) is a global health challenge that requires advanced strategies for its early detection and prevention. This study evaluates the South Korean population using the Korea National Health and Nutrition Examination Survey (KNHANES) dataset from 2015 to 2021, provided by the Korea Disease Control and Prevention Agency (KDCA), focusing on improving diabetes prediction models. Outlier removal was implemented using Mahalanobis distance (MAH), and feature selection was based on multicollinearity (MC) and reliability analysis (RA). The proposed Extreme Gradient Boosting (XGBoost) model demonstrated exceptional performance, achieving an accuracy of 98.04% (95% CI: 97.89~98.59), an F1-score of 98.24%, and an Area Under the Curve (AUC) of 98.71%, outperforming other state-of-the-art models. The study highlights the significance of rigorous outlier detection and feature selection in enhancing the predictive power of diabetes risk models. Notably, a significant increase in diabetes cases was observed during the COVID-19 pandemic, particularly linked to male sex, older age, rural location, hypertension, and obesity, underscoring the need for enhanced public health strategies for early intervention and targeted prevention.