ObjectiveMultimorbidity, particularly diabetes combined with hypertension (DCH), is a significant public health concern. Currently, there is a gap in research utilizing machine learning (ML) algorithms to predict hypertension risk in Chinese middle-aged and elderly diabetic patients, and gender differences in DCH comorbidity patterns remain unclear. We aimed to use ML algorithms to predict DCH and identify its determinants among middle-aged and elderly diabetic patients in China. Study designCross-sectional study. MethodsData were collected on 2775 adults with diabetes aged ≥45 years from the 2015 China Health and Retirement Longitudinal Study. We employed nine ML algorithms to develop prediction models for DCH. The performance of these models was evaluated using the area under the curve (AUC). Additionally, we conducted variable importance analysis to identify key determinants. ResultsOur results showed that the best prediction models for the overall population, men, and women were extreme gradient boosting (AUC = 0.728), light gradient boosting machine (AUC = 0.734), and random forest (AUC = 0.737), respectively. Age, waist circumference, body mass index, creatinine level, triglycerides, taking Western medicine, high-density lipoprotein cholesterol, blood urea nitrogen, total cholesterol, low-density lipoprotein cholesterol, and sleep disorders were identified as common important predictors by all three populations. ConclusionsML algorithms showed accurate predictive capabilities for DCH. Overall, non-linear ML models outperformed traditional logistic regression for predicting DCH. DCH predictions exhibited variations in predictors and model accuracy by gender. These findings could help identify DCH early and inform the development of personalized intervention strategies.