Vitamin D deficiency has been associated with the development of many human diseases, and with poor reproductive performance in laboratory rodents. We currently have no idea how natural selection directly acts on variation in vitamin D metabolism due to a total lack of studies in wild animals. Here, we measured serum 25 hydroxyvitamin D (25(OH)D) concentrations in female Soay sheep that were part of a long-term field study on St Kilda. We found that total 25(OH)D was strongly influenced by age, and that light coloured sheep had higher 25(OH)D3 (but not 25(OH)D2) concentrations than dark sheep. The coat colour polymorphism in Soay sheep is controlled by a single locus, suggesting vitamin D status is heritable in this population. We also observed a very strong relationship between total 25(OH)D concentrations in summer and a ewe's fecundity the following spring. This resulted in a positive association between total 25(OH)D and the number of lambs produced that survived their first year of life, an important component of female reproductive fitness. Our study provides the first insight into naturally-occurring variation in vitamin D metabolites, and offers the first evidence that vitamin D status is both heritable and under natural selection in the wild.