Background: Vitamin D deficiency (VDD) increases the risk for type 2 diabetes mellitus (T2DM), which might be related to insulin resistance (IR). We aimed to explore the association between the triglyceride-glucose (TyG) index, a reliable indicator of IR, and VDD in patients with T2DM. Methods: There were 1034 participants with T2DM enrolled in the Second Xiangya Hospital of Central South University. The TyG index was calculated as ln (fasting triglyceride (TG, mg/dL) × fasting blood glucose (mg/dL)/2). VDD was defined as 25-hydroxyvitamin D [25(OH)D] level < 50 nmol/L. Results: Correlation analysis showed a negative association between the TyG index and 25(OH)D level. After adjustments for clinical and laboratory parameters, it was revealed that when taking the Q1 quartile of TyG index as a reference, an increasing trend of VDD prevalence was presented in the other three groups divided by TyG index quartiles, where the OR (95% CI) was 1.708 (1.132–2.576) for Q2, 2.041 (1.315–3.169) for Q3, and 2.543 (1.520–4.253) for Q4 (all p < 0.05). Conclusions: Patients with higher TyG index were more likely to have an increased risk of VDD in T2DM population, which may be related to IR.