Results: Two-sample MR analysis showed that increased risk of HF was associated with decreased risk of cervical, brain, breast, colorectal, lung, and skin cancers, and co-localization combined with SMR analysis identified ABO and SURF1 as HF-associated genes, and transcriptomic analyses showed that ABO is a risk factor for HF and a protective factor against cancer, whereas SURF1 is a protective factor against HF and a protective factor against cancer. The gene discussed is ABO; the disease is skin neoplasm.