Previous studies have suggested an association between asthma and dementia, but the results are still inconsistent.Using the Taiwan National Health Insurance Database, we enrolled 11,030 participants aged more than 45 years with asthma and 44,120 (1:4) age-/sex-matched controls between 1998 and 2008, and followed them to the end of 2011. Cases of any dementia or Alzheimer's disease that developed during the follow-up period were identified.Asthma was associated with an increased risk of developing any dementia [hazard ratio (HR): 2.17, 95% confidence interval (CI): 1.87–2.52] and Alzheimer's disease (HR: 2.62, 95% CI: 1.71–4.02). Stratified by age, both asthma in midlife (>45 years and <65 years) and in late life (≥65 years) was associated with a greater likelihood of any dementia (HR: 2.48, 95% CI: 1.80–3.41; HR: 2.06, 95% CI: 1.74–2.44).Asthma in midlife and in late life increased the risk of developing any dementia and Alzheimer's disease. The underlying mechanisms between asthma and dementia require further investigation.