Ferroptosis is an iron-dependent mode of cell death associated with the occurrence and development of age-related neurodegenerative diseases. Currently, there are no effective drugs available to prevent or treat these aging-related neurodegenerative diseases. Vitamin D (VD) is an antioxidant and immunomodulator, but its relationship with ferroptosis in aging-related neurodegenerative diseases has not been extensively studied. In this study, we aimed to investigate the role of VD in learning and memory in aging mice. To examine whether VD protects aging hippocampal neurons, we used physiologically active 1,25(OH)2D3. We established aging models in vivo (C57BL/6 mice) and in vitro (HT22 cells) using D-galactose (D-gal). The results demonstrated that VD could improve learning and memory in mice aged via the use of D-gal, and it reduced damage to hippocampal neurons. VD could regulate ferroptosis-related proteins (increasing GPX4 expression and decreasing ACSL4 and ALOX15 protein expression levels), increasing GSH levels, reducing MDA and intracellular and mitochondrial ROS levels, as well as total iron and Fe2+ levels, and improving mitochondrial morphology, thereby alleviating ferroptosis in aging hippocampal neurons. Additionally, VD activated the VDR/Nrf2/HO-1 signaling pathway, thereby inhibiting ferroptosis. Notably, when the VDR was knocked down, VD lost its ability to activate Nrf2. Consequently, inhibiting Nrf2 decreased the protective effect of VD against ferroptosis in aged hippocampal neurons. In summary, VD activates the Nrf2/HO-1 signaling pathway through the VDR, effectively preventing ferroptosis induced by aging in hippocampal neurons.