Elderly people are at a high risk of developing vitamin D (VitD) deficiency due to both decreased intake and cutaneous synthesis. Most of the biological actions of VitD are mediated by the vitamin D receptor (VDR), which is present in neurons and glial cells of the hippocampus, and in the cortex and subcortical nuclei, essential areas for cognition. It is known that VDR gene polymorphisms may decrease the VDR affinity for VitD. Objective: The present study aimed to investigate the influence of VitD levels on cognitive decline in patients with dementia due to Alzheimer's disease (AD, n = 32) and mild cognitive impairment (MCI, n = 15) compared to cognitively healthy elderly (n = 24). We also evaluated the association of VDR gene polymorphisms with cognitive disturbance. Methods: Four polymorphisms on the VDR gene were studied, namely, BsmI, ApaI, FokI and TaqI, by polymerase chain reaction-restriction fragment length polymorphism. Serum levels of 25-hydroxy vitamin D (25(OH)D) were determined by high performance liquid chromatography. Results: No significant difference in 25(OH)D levels or genotypic/allelic frequencies was observed between the groups. Deficiency of 25(OH)D was more frequently observed in women. The AA/AG genotypes of the BsmI polymorphism was associated with sufficient 25(OH)D levels, while the GG genotype of this same polymorphism was associated to insufficient levels in the cognitively-impaired group (individuals with AD or MCI). Conclusions: The data obtained do not confirm the relationship between reductions of VitD levels, polymorphisms in the VDR gene, and altered cognitive function in this sample. However, the data indicate that BsmI polymorphism in the VDR gene is associated with the VitD levels in individuals with cognitive decline.