Immune disorders are key heart failure (HF) triggers, but little is known about whether the status of immunity affects the incidence of HF. To explore this, we used blood cell counts and derived ratios to investigate the association between immunity status markers and HF incidence. The number and proportion of peripheral blood leucocytes in a physiological state are related to the body's immune status. Neutrophils, monocytes, SII (systemic immune-inflammatory index), NLR (neutrophil-to-lymphocyte ratio), and PLR (platelet-to-lymphocyte ratio) serve as innate immunity status markers, while lymphocytes and LMR (lymphocyte-to-monocyte ratio) serve as specific immunity status markers. 330 362 UK Biobank (UKB) participants were finally examined. Cox proportional hazard models were used to explore the relationship between immunity status markers and HF incidence. Flexible parametric survival models were used to capture time-varying relationships between blood cell ratios and HRs for HF. Subgroup analyses were conducted by age, sex, and body mass index. Finally, sensitivity analyses were performed to validate the results. During a median follow-up of 14.1 years, 9611 (2.9%) participants developed HF. Neutrophils, monocytes, SII, and NLR were positively associated with HF incidence, with fully adjusted per SD increment HR (95% CI) of 1.20 (1.17 to 1.22), 1.09 (1.07 to 1.12), 1.12 (1.10 to 1.14), and 1.16 (1.14 to 1.18), respectively. Platelets, lymphocytes, and LMR were inversely correlated with HF incidence, with fully adjusted per SD increment HR (95% CI) of 0.97 (0.95 to 1.00), 0.97 (0.95 to 0.99), and 0.90 (0.88 to 0.92), respectively. The innate immunity status markers were positively associated with HF incidence, while specific immunity status markers exhibited an inverse association, offering novel insights for HF prediction and intervention.