The triglyceride-glucose (TyG) index has been proposed as a new marker for insulin resistance, which is associated with a risk of major depressive disorder (MDD). This study aims to explore whether the TyG index is correlated with MDD. In total, 321 patients with MDD and 325 non-MDD patients were included in the study. The presence of MDD was identified by trained clinical psychiatrists using the International Classification of Diseases 10th Revision. The TyG index was calculated as follows: Ln (fasting triglyceride [mg/dL] × fasting glucose [mg/dL]/2). The results revealed that the MDD group presented higher TyG index values than the non-MDD group (8.77 [8.34–9.17] vs 8.62 [8.18–9.01],P< .001). We also found significantly higher morbidity of MDD in the highest TyG index group than in the lower TyG index group (59.9% vs 41.4%,P< .001). Binary logistic regression revealed that TyG was an independent risk factor for MDD (odds ratio [OR] 1.750, 95% confidence interval: 1.284–2.384,P< .001). We further assessed the effect of TyG on depression in sex subgroups. The OR was 3.872 (OR 2.014, 95% confidence interval: 1.282–3.164,P= .002) for the subgroup of men. It is suggested that the TyG index could be closely associated with morbidity in MDD patients; thus, it may be a valuable marker for identifying MDD.