Impaired cognition increases mortality in the aged. It is unclear how dietary quality might affect this relationship.To examine how dietary diversity and cognition might interact to determine survival.In a Nutrition and Health Survey in Taiwan (NAHSIT 1999-2000), 1,839 representative elderly were followed for mortality up to 10 years. The dietary quality measure was a dietary diversity score (DDS, range: 0-6) to present six food groups (dairy, meat, rice and grains, fruit, vegetable,fat and oil) derived from a 24-h dietary recall. Cognitive function was evaluated by the validated Short Portable Mental Status Questionnaire (SPMSQ).Those with cognitive impairment (SPMSQ≥3 errors) had 2.56 (95% confidence intervals (CI), 1.99-3.28) times the all-cause-mortality risk of those with intact cognition. After control for potential confounders, the adjusted hazard ratio (HR) remained significant (1.46, 95% CI: 1.06-2.02). Significant interactions for DDS and cognition were found (p<0.001). Jointly, compared to normal-SPMSQ-highest DDS, the greatest HR is where impaired cognition is combined with the lowest DDS (HR 2.24, 95% CI: 1.19-4.24). Increased DDS was associated with improvement in survival that is especially evident in those with 1-2 errors where the greatest HR reduction was found, and for fruit. Attributability for mortality amounted to 18% for impaired cognition and 33% for least diverse diet.Dietary diversity may improve survival in relation to impaired cognitive function.