Dementia is the severe loss of global cognitive ability in a previously healthy person. This study examined the relationship between Helicobacter pylori infection (HP-I) and non-Alzheimer's dementia (non-AD) using a nationwide population-based dataset. The International Classification of Diseases, Ninth Revision (ICD-9) codes for dementia were used to define dementia patients; in addition, we examined the association of dementia with other comorbidities. Patients aged ≥40years with newly diagnosed HP-I (ICD-9 code 041.86) during 1998-2010 were identified as the HP-I cohort. The comparison cohort consisted of people aged ≥40years without HP-I (non-HP-I) randomly selected from the database at a ratio of 1:4 in the same time period. The controls were frequency matched according to the age (every 5years), sex, and index year of patients in the HP-I cohort. Follow-up was performed for all patients until the date of dementia diagnosis (ICD-9 codes 290.0-290.4, 294.1, 331.0-331.2), date of withdrawal from the Taiwanese National Health Insurance program, date of death, or until December 31 2010. Compared with patients without HP-I, HP-I patients were 1.60-fold (95% confidence interval [CI] 1.32-1.95) more likely to develop non-AD. There was no statistical association between HP-I and AD. The adjusted hazard ratio of dementia increased from 1.48 (95% CI 1.22-1.79) for patients who had HP-I once to 2.19 (95% CI 1.13-4.25) for patients who had HP-I two or more times. Our study revealed that HP-I may be a critical risk factor for the development of non-AD. Further investigation, including clinical trials, to examine the microbe-dementia connection may provide further proof of the association between HP-I and dementia.