Background and purpose: Hypertension increases the risk for cognitive impairment and promotes vascular and renal inflammation. We tested if immune cell infiltration occurs in the brain during hypertension and if it is associated with cognitive impairment. Experimental approach: Male C57Bl/6 mice were administered vehicle, angiotensin II (0.7 mg/kg/d S.C.) or aldosterone (0.72 mg/kg/d S.C.) via osmotic minipumps. A subset of mice also received hydralazine (50 mg/kg) in their drinking water after minipump implantation. We measured systolic blood pressure, markers of inflammation, working memory and transcriptomic changes in the brain. Key results: Administration of angiotensin II or aldosterone increased blood pressure and promoted blood-brain barrier dysfunction, leukocyte accumulation and impairment of working memory in mice. When co-administered with angiotensin II, hydralazine prevented the development of these changes. In a separate cohort of mice in which angiotensin II-induced changes were first established, intervention with hydralazine lowered blood pressure but did not reverse brain inflammation or cognitive impairment. Finally, angiotensin II infusion altered the transcriptomic profile of the whole brain, as well as specifically within the hippocampus, and co-treatment with hydralazine modulated these changes. Conclusion and implications: Experimental hypertension leads to brain inflammation and impaired working memory. Cognitive impairment that develops during hypertension can be inhibited, but not readily reversed, by anti-hypertensive therapy.