We study whether long-term exposure to air pollution impairs cognition among the US Medicare population. We link fifteen years of administrative records for 7.4 million adults age 65 and older to the Environmental Protection Agency’s air-quality monitoring network to track the evolution of individuals’ health, onset of Alzheimer’s disease and related forms of dementia, financial decisions, and cumulative exposure to fine-particulate air pollution (PM2.5) based on their precise residential locations. We see evidence of Tiebout’s mechanism at work: movers tend to move to less polluted neighborhoods but, among movers, those who are older and those with dementia tend to move to more polluted neighborhoods. We develop several strategies to address residential sorting, including utilizing quasi-random variation in PM2.5 exposures stemming from the EPA’s initial (2005) designation of nonattainment counties for PM2.5. Across a range of models and identification strategies, we find that a 1 microgram per cubic meter (μg/m3) increase in decadal exposure to PM2.5 (8.5% of the mean) increases the prevalence of dementia by 1% to 3%. We also find that higher cumulative exposures to PM2.5 impair financial decision making among those not diagnosed with dementia, where the magnitudes of the effects are 4% to 6% of the effect of dementia on decision making. Finally, we find no evidence that exposure to PM2.5 affects the diagnosis rates for morbidities thought to be unrelated to air-pollution and no evidence that pollutants other than PM2.5 impair cognition, providing evidence against confounding.