Risk of multiple sclerosis (MS) decreases with increasing plasma levels of 25-hydroxyvitamin D [25(OH)D]. If this association reflected a protective effect of vitamin D, MS risk should be lower among individuals carrying genetic variants that predict high 25(OH)D levels. The aim of the study was to determine whether individuals with genotypes predicting higher 25(OH)D levels have decreased MS risk. Logistic regression was used to assess the association between single nucleotide polymorphisms (SNPs) associated with 25(OH)D levels and MS risk in 1,655 cases and 6,349 controls. Analyses were further stratified by HLA-DR15 status, assessed by genotyping a single SNP strongly correlated with the HLA DRB1 1501 risk haplotype, and complemented by considering a SNP near CYP27B1. SNPs in GC were predictors of 25(OH)D levels, but not MS risk, in either HLA-DR15 negative or HLA-DR15 positive individuals. In contrast, there was a suggestion of a difference in the effect of a CYP2R1 allele dependent on HLA-DR15 genotype. The 'A' allele of CYP2R1 rs10741657 was associated with increased 25(OH)D levels and a non-significant reduced MS risk among HLA-DR15 negative (OR = 0.89, 95% CI: 0.79, 1.01) that was not apparent in HLA-DR15 positive individuals. The 'C' allele of CYP27B1 rs703842 was inversely associated with MS risk; this association appeared stronger among HLA-DR15 negative (OR = 0.79, 95% CI: 0.69, 0.90) compared to HLA-DR15 positive individuals (OR = 0.91, 95% CI: 0.80, 1.04). This preliminary finding suggests the possibility that the putative beneficial effect of vitamin D on MS risk maybe attenuated in individuals carrying the HLA-DR15 MS risk allele.