Introduction: Nonfocal transient neurological attacks (TNAs) are associated with an increased risk of future dementia, but it is unclear whether TNAs are also associated with concurrent cognitive impairment. We hypothesized that recent TNAs are related to worse cognitive functioning. We tested our hypothesis in patients with heart failure, as these patients are at risk of cerebral hypoperfusion, which might play a role in the etiology of TNAs. Methods: We performed neuropsychological testing in all patients with heart failure enrolled in the Heart Brain Connection study. We assessed global cognition, attention-psychomotor speed, executive functioning, memory and language. All patients were interviewed with a standardized questionnaire on the occurrence of TNAs in the preceding 6 months. We studied associations between TNAs and cognitive functioning with linear and logistic regression analyses, adjusted for age, sex and education. We performed additional analyses in patients without previous stroke or TIA and in patients without brain infarction on MRI. Results: Thirty-seven (23%) of 158 patients (mean age 70 years, 67% men) experienced one or more TNAs. Patients with a recent TNA were more likely to be impaired on ≥ 1 cognitive domains than patients without TNAs [41% vs. 18%, adjusted odds ratio 4.6, 95% confidence interval (CI) 1.8–11.8]. Patients with TNAs performed worse than patients without TNAs on global cognition (mean difference in z scores − 0.36, 95% CI − 0.54 to − 0.18), and on the cognitive domains attention-psychomotor speed (mean difference − 0.40, 95% CI − 0.66 to − 0.14), memory (mean difference − 0.57, 95% CI − 0.98 to − 0.15) and language (mean difference − 0.47, 95% CI − 0.79 to − 0.16). These associations were independent of cardiac output and volume of white matter hyperintensities. Subgroup analyses in patients without previous stroke or TIA or brain infarction on MRI (n = 78) yielded comparable results, with the exception of the cognitive domain language, which was no longer different between patients with and without TNAs. Conclusion: Among patients with heart failure, TNAs are associated with cognitive impairment, which warrants the need for more clinical awareness of this problem.