Hypertension is one of the major predisposing factors for neurodegenerative disease characterized with activated renin-angiotensin system (RAS) in both periphery and brain. Vitamin D (VitD) is recently recognized as a pleiotropic hormone with strong neuroprotective properties. While multiple lines of evidence suggest that VitD can act on RAS, the evidence concerning the crosstalk between VitD and RAS in the brain is limited. Therefore, this study aims to evaluate whether VitD can modulate brain RAS to trigger neuroprotective actions in the brain of spontaneously hypertensive rats (SHR). Our data showed that calcitriol treatment induced VDR expression and inhibited neural death in the prefrontal cortex of SHR. Sustained calcitriol administration also inhibited microglia M1 polarization, but enhanced M2 polarization, accompanied with decreased expression of proinflammatory cytokines. We then further explored the potential mechanisms and showed that SHR exhibited overactivated classical RAS with increased expression of angiotensin II (Ang II) receptor type 1 (AT1), angiotensin converting enzyme (ACE) and Ang II production, whereas the counteracting arm of traditional RAS, ACE2/Ang(1–7)/MasR, was impaired in the SHR brain. Calcitriol nonsignificantly suppressed AT1 and ACE but markedly reduced Ang II formation. Intriguingly, calcitriol exerted pronouncedly impact on ACE2/Ang(1–7)/MasR axis with enhanced expression of ACE2, MasR and Ang(1–7) generation. Meanwhile, calcitriol ameliorated the overactivation of NADPH-oxidase (Nox), the downstream of RAS, in SHR, and also mitigated oxidative stress. In microglial (BV2) cells, we further found that calcitriol induced ACE2 and MasR with no significant impact on ACE and AT1. In accordance, calcitriol also attenuated Ang II-induced Nox activation and ROS production, and shifted the microglia polarization from M1 to M2 phenotype. However, co-treatment with A779, a specific MasR antagonist, abrogated the antioxidant and neuroimmune modulating actions of VitD. These findings strongly indicate the involvement of ACE2/Ang(1–7)/MasR pathway in the neuroprotective mechanisms of VitD in the hypertensive brain.