Diabetes is a common global disease closely associated with an increased risk of depression. This study analyzed China Health and Retirement Longitudinal Study (CHARLS) data to examine depression in diabetic patients across China. using 29 variables including demographic, behavioral, health conditions, and mental health parameters. The dataset was randomly divided into a 70% training set and a 30% validation set. Predictive factors significantly associated with depression were identified using least absolute shrinkage and selection operator (LASSO) and logistic regression analysis. A nomogram model was constructed using these predictive factors. The model evaluation included the C-index, calibration curves, the Hosmer-Lemeshow test, and DCA. Depression prevalence was 39.1% among diabetic patients. Multifactorial logistic regression identified significant predictors including gender, permanent address, self-perceived health status, presence of lung disease, arthritis, memory disorders, life satisfaction, cognitive function score, ADL score, and social activity. The nomogram model showed high consistency and accuracy, with AUC values of 0.802 for the training set and 0.812 for the validation set. Both sets showed good model fit with Hosmer-Lemeshow
P
> 0.05. Calibration curves showed significant consistency between the nomogram model and actual observations. ROC and DCA indicated that the nomogram had a good predictive performance. The nomogram developed in this study effectively assesses depression risk in diabetic patients, helping clinicians identify high-risk individuals. This tool could potentially improve patient outcomes.