Observational research suggests that the evidence linking dietary nutrient intake (encompassing minerals, vitamins, amino acids, and unsaturated fatty acids) to type 2 diabetes (T2D) is both inconsistent and limited. This study aims to explore the potential causal relationship between dietary nutrients and T2D. Causal estimation utilized Mendelian randomization techniques. Single nucleotide polymorphisms linked to dietary nutrients were identified from existing genome-wide association studies and used as instrumental variables. Genome-wide association studies data pertinent to T2D were sourced from the DIMANTE consortium and the FinnGen database. Techniques including inverse variance weighting (IVW), weighted mode, weighted median, and Mendelian randomization-Egger were employed for causal inference, complemented by sensitivity analysis. Genetically predicted higher phenylalanine (IVW: odds ratio = 1.10 95% confidence interval 1.04–1.17, P = 1.5 × 10−3, q_pval = 3.4 × 10−2) and dihomo-gamma-linolenic acid (IVW: odds ratio = 1.001 95% confidence interval 1.0006–1.003, P = 3.7 × 10−3, q_pval = 4.1 × 10−2) levels were directly associated with T2D risk. Conversely, no causal relationships between other nutrients and T2D were established. We hypothesize that phenylalanine and dihomo-gamma-linolenic acid contribute to the pathogenesis of T2D. Clinically, the use of foods with high phenylalanine content may pose potential risks for patients with a heightened risk of T2D. Our study provides evidence supporting a causal link between dietary nutrient intake and the development of T2D.