Background: Heart failure is common, complex, and often associated with coexisting chronic medical conditions and a high mortality. We aimed to assess the epidemiology of people admitted to hospital with heart failure with reduced ejection fraction (HFrEF) and heart failure with preserved ejection fraction (HFpEF), including the period covering the COVID-19 pandemic, which was previously not well characterised., Methods: In this retrospective, cohort study, we used whole-population electronic health records with 57 million individuals in England to identify patients hospitalised with heart failure as the primary diagnosis in any consultant episode of an in-patient admission to a National Health Service (NHS) hospital. We excluded individuals with less than 1 year of medical history records in primary or secondary care; admissions to NHS hospitals for which less than 10% of heart failure cases were linkable to the National Heart Failure Audit (NHFA); individuals younger than 18 years at the time of the heart failure hospitalisation; and patients who died in hospital during the index heart failure admission. For patients with new onset heart failure, we assessed incidence rates of 30-day and 1-year all-cause and cause-specific (cardiovascular, non-cardiovascular, and heart failure-related) emergency rehospitalisation and mortality after discharge, and dispensed guideline-recommended medical therapy (GRMT). Follow-up occurred from the index admission to the earliest occurrence of the event of interest, death, or end of data coverage. We estimated adjusted hazard ratios (HRs) to compare HFrEF with HFpEF. We computed population-attributable fractions to quantify the percentage of outcomes attributable to coexisting chronic medical conditions., Findings: Among 233 320 patients identified who survived the index heart failure admission across 335 NHS hospitals between Jan 1, 2019, and Dec 31, 2022, 101 320 (43·4%) had HFrEF, 71 910 (30·8%) had HFpEF, and 60 090 (25·8%) had an unknown classification. In patients with new onset heart failure, there were reductions in all-cause 30-day (-5·2% [95% CI -7·7 to -2·6] in 2019-22) and 1-year rehospitalisation rates (-3·9% [-6·6 to -1·2]). Declining 30-day rehospitalisation rates affected patients with HFpEF (-4·8% [-9·2 to -0·2]) and HFrEF (-6·2% [-10·5 to -1·6]), although 1-year rates were not statistically significant for patients with HFpEF (-2·2% [-6·6 to 2·3] vs -5·7% [-10·6 to -0·5] for HFrEF). There were no temporal trends in incidence rates of 30-day or 1-year mortality after discharge. The rates of all-cause (HR 1·20 [1·18-1·22]) and cause-specific rehospitalisation were uniformly higher in those with HFpEF than those with HFrEF. Patients with HFpEF also had higher rates of 1-year all-cause mortality after discharge (HR 1·07 [1·05-1·09]), driven by excess risk of non-cardiovascular death (HR 1·25 [1·21-1·29]). Rates of rehospitalisation and mortality were highest in patients with coexisting chronic kidney disease, chronic obstructive pulmonary disease, dementia, and liver disease. Chronic kidney disease contributed to 6·5% (5·6-7·4) of rehospitalisations within 1 year for HFrEF and 5·0% (4·1-5·9) of rehospitalisations for HFpEF, double that of any other coexisting condition. There was swift implementation of newer GRMT, but markedly lower dispensing of these medications in patients with coexisting chronic kidney disease., Interpretation: Rates of rehospitalisation in patients with heart failure in England have decreased during 2019-22. Further population health improvements could be reached through enhanced implementation of GRMT, particularly in patients with coexisting chronic kidney disease, who, despite being at high risk, remain undertreated., Funding: Wellcome Trust, Health Data Research UK, British Heart Foundation Data Science Centre., Competing Interests: Declaration of interests RAF received studentship awards from the Health Data Research UK-The Alan Turing Institute Wellcome Trust PhD Programme in Health Data Science (grant 218529/Z/19/Z). PR received a grant from the Dr Johannes and Hertha Tuba Foundation. BLN reports fees for travel support, advisory boards, scientific presentations, and steering committee roles from AstraZeneca, Alexion, Bayer, Boehringer Ingelheim, Cambridge Healthcare Research, Cornerstone Medical Education, Janssen, Limbic, Medscape, Novo Nordisk, and Travere Therapeutics with all honoraria paid to the George Institute for Global Health. CT received a studentship from the University College London UK Research and Innovation Centre for doctoral training in AI-enabled healthcare (EP/S021612/1), Medical Research Council Clinical Top-Up, and a studentship from the National Institute for Health and Care Research (NIHR) Biomedical Research Centre at University College London Hospital NHS Trust. NC received a personal fellowship from the Research Foundation Flanders and a research grant from the European Society of Cardiology. ER is funded by Forte Swedish Research Council for Health, Working Life And Welfare (2022–00882) individual postdoctoral fellowship, and Vetenskapsrådet Swedish Research Council (grant 2023–01982). SD received research funding from GlaxoSmithKline, AstraZeneca, Bayer, and BenevolentAI. CS is a director of the British Heart Foundation Data Science Centre and a chief scientist and deputy director at Health Data Research UK; has codeveloped National Health Service (NHS) England Secure Data Environment; and leads the CVD-COVID UK/COVID-IMPACT Consortium. SEP has a leadership role for the European Association of Cardiovascular Imaging, received consulting fees from Circle Cardiovascular Imaging, and holds an advisory role for the PROTEUS trial (NCT05028179). GMC served on the board of directors of Satellite Healthcare; served as chair or cochair of trial steering committees for Akebia, AstraZeneca, CSL Behring, Sanifit, and Vertex; served as an advisor for Applaud, CloudCath, Durect, Eliaz Therapeutics, Miromatrix, Outset, Physiowave, Renibus, and Unicycive; and served on data safety monitoring boards for Bayer, Mineralys, and ReCor. KK acted as a consultant or speaker and receiving grants for investigator-initiated studies from AstraZeneca, Abbott, Amgen, Bayer, Daiichi-Sankyo, Embecta, Nestle Health Science, Novartis, Novo Nordisk, Roche, Servier, Sanofi-Aventis, Lilly, MSD, Boehringer Ingelheim, Oramed Pharmaceuticals, and Applied Therapeutics; and was a chair of the scientific advisory group for Emergencies Ethnicity Subgroup. JS has direct or indirect stock ownership in Anagram Kommunikation, Sence Research, Symptoms Europe, and MinForskning; and professional services to Amgen, AstraZeneca, Bayer, Boehringer Ingelheim, Eli Lilly, Gilead, GSK, Göteborg University, Itrim, Ipsen, Janssen, Karolinska Institutet, LIF, Linköping University, Novo Nordisk, Parexel, Pfizer, Region Stockholm, Region Uppsala, Sanofi, STRAMA, Takeda, TLV, Uppsala University, Vifor Pharma, and WeMind. CA received grants from the National Health Medical Research Council (Medical Research Futures Fund) and NSW Health; and honoraria from AstraZeneca, Novo Nordisk, and Amgen. JGFC reports receipt of personal honoraria for lectures and advisory boards from Pharmacosmos, Vifor, AstraZeneca, Amgen, Bayer, Novartis, and Servier; has received research grants through The University of Glasgow from Pharmacosmos and Vifor; and received funding from the British Heart Foundation Center of Research Excellence (RE/18/6134217). JD reports grants, personal fees, and non-financial support from MSD and Novartis; grants from Pfizer and AstraZeneca; and is part of the International Cardiovascular and Metabolic Advisory Board for Novartis, Steering Committee of UK Biobank, MRC International Advisory Group, MRC High Throughput Science Omics Panel, Scientific Advisory Committee for Sanofi, International Cardiovascular and Metabolism Research and Development Portfolio Committee for Novartis, AstraZeneca Genomics Advisory Board, Scientific Advisory Board of Nightingale Health, Access Board of Our Future Health, and Scientific Advisory Committee of Leducq Foundation. JJVM received payments through Glasgow University for work on clinical trials, consulting, and other activities from Amgen, AstraZeneca, Bayer, Cardurion, Cytokinetics, GSK, KBP Biosciences, and Novartis; personal consultancy fees from Alnylam Pharma, Bayer, BMS, George Clinical, Ionis Pharma, Novartis, Regeneron Pharma, and River 2 Renal; personal lecture fees from Abbott, Alkem Metabolics, AstraZeneca, Blue Ocean Scientific Solutions, Boehringer Ingelheim, Canadian Medical and Surgical Knowledge, Emcure Pharma, Eris Lifesciences, European Academy of CME, Hikma Pharmaceuticals, Imagica Health, Intas Pharma, JB Pharma, Lupin Pharma, Medscape (Heart.org), ProAdWise Communications, Radcliffe Cardiology, Sun Pharma, The Corpus, Translation Research Group, and Translational Medicine Academy; and is a director of Global Clinical Trial Partners. MV received research grant support, served on advisory boards, or had speaker engagements with American Regent, Amgen, AstraZeneca, Bayer, Baxter, Boehringer Ingelheim, Chiesi, Cytokinetics, Lexicon Pharmaceuticals, Merck, Novartis, Novo Nordisk, Pharmacosmos, Relypsa, Roche Diagnostics, Sanofi, and Tricog Health; and participates on clinical trial committees for AstraZeneca, Galmed, Novartis, Bayer, Occlutech, and Impulse Dynamics. AMW received funding from the British Heart Foundation Data Science Centre (HDRUK2023.0239) and NIHR (NIHR303137). All other authors declare no competing interests., (Copyright © 2024 The Author(s). Published by Elsevier Ltd. This is an Open Access article under the CC BY 4.0 license. Published by Elsevier Ltd.. All rights reserved.)