To determine the prognostic value of atrial fibrillation (AF) in patients with heart failure (HF) and preserved, mid-range or reduced ejection fraction (EF).Patients hospitalised for acute HF were enrolled in the Korean Acute Heart Failure registry, a prospective, observational, multicentre cohort study, between March 2011 and February 2014. HF types were defined as reduced EF (HFrEF, LVEF <40%), mid-range EF (HFmrEF, LVEF 40%-49%) or preserved EF (HFpEF, LVEF ≥50%).Of 5414 patients enrolled, HFrEF, HFmrEF and HFpEF were seen in 3182 (58.8%), 875 (16.2%) and 1357 (25.1%) patients, respectively. The prevalence of AF significantly increased with increasing EF (HFrEF 28.9%, HFmrEF 39.8%, HFpEF 45.2%; p for trend <0.001). During follow-up (median, 4.03 years; IQR, 1.39-5.58 years), 2806 (51.8%) patients died. The adjusted HR of AF for all-cause death was 1.06 (0.93-1.21) in the HFrEF, 1.10 (0.87-1.39) in the HFmrEF and 1.22 (1.02-1.46) in the HFpEF groups. The HR for the composite of all-cause death or readmission was 0.97 (0.87-1.07), 1.14 (0.93-1.38) and 1.03 (0.88-1.19) in the HFrEF, HFmrEF and HFpEF groups, respectively, and the HR for stroke was 1.53 (1.03-2.29), 1.04 (0.57-1.91) and 1.90 (1.13-3.20), respectively. Similar results were observed after propensity score matching analysis.AF was more common with increasing EF. AF was seen to be associated with increased mortality only in patients with HFpEF and was associated with an increased risk of stroke in patients with HFrEF or HFpEF.NCT01389843.