This cross-sectional study aimed to examine the association between the triglyceride-glucose (TyG) index and the prevalence of depression in individuals with type 2 diabetes. A nationally representative sample of 3225 individuals with type 2 diabetes was enrolled in this study. Multivariable logistic regression models were used to assess the association between the TyG index and depression, adjusting for potential confounding factors. After adjusting for age, gender, BMI, smoking, alcohol consumption, congestive heart failure, and coronary heart disease, a significant positive association was found between the TyG index and the prevalence of depression in individuals with type 2 diabetes (OR = 1.54, 95% CI: 1.21-1.95). Subgroup analyses showed consistent associations across various demographic and clinical subgroups. This study provides evidence of a significant independent positive association between the TyG index and the prevalence of depression in individuals with type 2 diabetes.