Estrogen replacement therapy (ERT) has been proven to relieve menopausal-related mental disorders including depression in postmenopausal women. However, the unsafety of ERT hinders its clinical use. In this study, we would evaluate whether vitamin D (VD), a hormone with optimal safety profile, could relieve the depressive-like symptom in ovariectomized (OVX) rats. Furthermore, we would determine whether vitamin D and 17β-estradiol (E2) exert neurological function through their immunomodulatory effect in OVX rats. Middle-aged female SD rats were randomly divided into four groups, namely, control (SHAM), OVX, OVX + VD, and OVX + E2. Vitamin D (calcitriol, 100 ng/kg) and 17β-estradiol (30 μg/kg) had been daily gavaged in the OVX + VD and OVX + E2 group, respectively. After 10-week administration, vitamin D and 17β-estradiol both showed anti-depressive-like activity in the OVX rats. Using the method of immunofluorescent staining and western blot, vitamin D and 17β-estradiol were demonstrated to upregulate each other's receptors, including VDR, ERα, and ERβ in the hippocampus of OVX rats. Additionally, the upregulation of VDR, calbindin-D28k, and calbindin-D9k suggested that the vitamin D signaling system was amplified by vitamin D and 17β-estradiol. Vitamin D and 17β-estradiol showed neuroprotective effects by decreasing OVX-induced apoptosis and neuronal damage, regulating the AMPK/NF-κB signaling pathway, and reducing the proinflammatory cytokines (IL-1β, IL-6, and TNFα), as well as iNOS and COX-2 in the hippocampus of OVX rats. Collectively, the present study demonstrated that vitamin D and 17β-estradiol could upregulate each other's receptors and regulate the AMPK/NF-κB pathway to relieve the OVX-induced depressive-like state. The results could stimulate translational research towards the vitamin D potential for prevention or treatment of menopause-related depression.