The functions of the brain and heart, which are the two main supporting organs of human life, are closely linked. Numerous studies have expounded the mechanisms of the brain-heart axis and its related clinical applications. However, the effect of heart disease on brain function, defined as the heart-brain axis, is less studied even though cognitive dysfunction after heart disease is one of its most frequently reported manifestations. Hypoperfusion caused by heart failure appears to be an important risk factor for cognitive decline. Blood perfusion, the immune response, and oxidative stress are the possible main mechanisms of cognitive dysfunction, indicating that the blood-brain barrier, glial cells, and amyloid-β may play active roles in these mechanisms. Clinicians should pay more attention to the cognitive function of patients with heart disease, especially those with heart failure. In addition, further research elucidating the associated mechanisms would help discover new therapeutic targets to intervene in the process of cognitive dysfunction after heart disease. This review discusses cognitive dysfunction in relation to heart disease and its potential mechanisms.