Objective To determine the prevalence of anxiety and depression in hospitalized patients with heart failure. Methods From September 2015 to March 2016, 301 patients who were admitted to the cardiac ward of a tertiary hospital for heart failure were consecutively enrolled in this study. They were assessed with the Hospital Anxiety Depression Scale (HADs). Multivariate logistic regression analysis was performed to identify risk factors associated with anxiety and depression. Results Of the 301 participants, 124 (41.2%) were identified with anxiety and 177 (58.8%) with depression; 98 (32.6%) had both anxiety and depression. Higher prevalence of anxiety was found in female patients and those who resided in rural areas, had poor family support, had a class Ⅳ New York heart association (NYHA), and were admitted repeatedly (3 or more) for heart failure over the past year. Higher prevalence of depression was found in the patients with poor family support and those who had primary or lower education, had a class Ⅳ NYHA, and were in normal or under-weight range. The severity of the two conditions was positively correlated ( r=0.617, POR=2.045), class Ⅳ NYHA (OR=1.955), 3 or more repeated admissions for heart failure (OR=2.288) as predictors for anxiety and/or depression. Conclusion Anxiety and depression is prevalent in hospitalized patients with heart failure. Increased attention needs to be paid to the psychological health of those patients in high risk.