Background Prior research suggested a differential association of 25-hydroxyvitamin D (25(OH)D) metabolites with type 2 diabetes (T2D), with total 25(OH)D and 25(OH)D3 inversely associated with T2D, but the epimeric form (C3-epi-25(OH)D3) positively associated with T2D. Whether or not these observational associations are causal remains uncertain. We aimed to examine the potential causality of these associations using Mendelian randomisation (MR) analysis. Methods and findings We performed a meta-analysis of genome-wide association studies for total 25(OH)D (N = 120,618), 25(OH)D3 (N = 40,562), and C3-epi-25(OH)D3 (N = 40,562) in participants of European descent (European Prospective Investigation into Cancer and Nutrition [EPIC]–InterAct study, EPIC-Norfolk study, EPIC-CVD study, Ely study, and the SUNLIGHT consortium). We identified genetic variants for MR analysis to investigate the causal association of the 25(OH)D metabolites with T2D (including 80,983 T2D cases and 842,909 non-cases). We also estimated the observational association of 25(OH)D metabolites with T2D by performing random effects meta-analysis of results from previous studies and results from the EPIC-InterAct study. We identified 10 genetic loci associated with total 25(OH)D, 7 loci associated with 25(OH)D3 and 3 loci associated with C3-epi-25(OH)D3. Based on the meta-analysis of observational studies, each 1–standard deviation (SD) higher level of 25(OH)D was associated with a 20% lower risk of T2D (relative risk [RR]: 0.80; 95% CI 0.77, 0.84; p < 0.001), but a genetically predicted 1-SD increase in 25(OH)D was not significantly associated with T2D (odds ratio [OR]: 0.96; 95% CI 0.89, 1.03; p = 0.23); this result was consistent across sensitivity analyses. In EPIC-InterAct, 25(OH)D3 (per 1-SD) was associated with a lower risk of T2D (RR: 0.81; 95% CI 0.77, 0.86; p < 0.001), while C3-epi-25(OH)D3 (above versus below lower limit of quantification) was positively associated with T2D (RR: 1.12; 95% CI 1.03, 1.22; p = 0.006), but neither 25(OH)D3 (OR: 0.97; 95% CI 0.93, 1.01; p = 0.14) nor C3-epi-25(OH)D3 (OR: 0.98; 95% CI 0.93, 1.04; p = 0.53) was causally associated with T2D risk in the MR analysis. Main limitations include the lack of a non-linear MR analysis and of the generalisability of the current findings from European populations to other populations of different ethnicities. Conclusions Our study found discordant associations of biochemically measured and genetically predicted differences in blood 25(OH)D with T2D risk. The findings based on MR analysis in a large sample of European ancestry do not support a causal association of total 25(OH)D or 25(OH)D metabolites with T2D and argue against the use of vitamin D supplementation for the prevention of T2D.