Triglyceride glucose (TyG) index has been proposed as a credible and simple surrogate indicator for insulin resistance. The primary aim of this study was to novelly examine the associations between dietary patterns reflecting variations in circulating TyG index and the risk of type 2 diabetes mellitus (T2DM). This study included 120,988 participants from the UK Biobank, all of whom completed multiple 24-h dietary assessments. Dietary pattern scores were derived using reduced-rank regression (RRR) and Least Absolute Shrinkage and Selection Operator (LASSO) regression, based on the TyG index and approximately 80 food groups. The associations between the TyG index, related dietary pattern scores, and T2DM risk were evaluated using Cox regression models. During a median follow-up period of 11.2 years, 3,585 participants developed T2DM. A higher TyG index was significantly associated with an increased risk of T2DM. The two dietary patterns derived from RRR and LASSO showed a strong correlation (ρ = 0.88, p < 0.001) and shared similar characteristics at higher scores, including greater intakes of margarine, meat, fruit juice, and potatoes, alongside lower intakes of green vegetables, oily fish, yogurt, nuts and seeds, and dried fruits. Corresponding blood profiles, including elevated levels of C-reactive protein and HbA1c, along with reduced levels of HDL-C and docosahexaenoic acid, substantiated the dietary pattern assessments. The adjusted hazard ratios (HRs) for T2DM risk were 1.52 (95% CI: 1.33-1.73, p trend <0.001) and 1.48 (95% CI: 1.30-1.69, p trend <0.001) for dietary patterns derived using RRR and LASSO, respectively, comparing the highest to the lowest quintiles. The findings suggest that a higher TyG index and specific dietary patterns, characterized by higher intakes of margarine, meat, fruit juice, and potatoes, and lower intakes of green vegetables, oily fish, yogurt, nuts and seeds, and dried fruits, are associated with an increased risk of developing T2DM. These results underscore the potential of dietary modifications targeting these patterns to mitigate T2DM risk.