Failure of the human heart to maintain sufficient output of blood for the demands of the body, heart failure, is a common condition with high mortality even with modern therapeutic alternatives. To identify molecular determinants of mortality in patients with new-onset heart failure, we performed a meta-analysis of genome-wide association studies and follow-up genotyping in independent populations. We identified and replicated an association for a genetic variant on chromosome 5q22 with 36% increased risk of death in subjects with heart failure (rs9885413, P = 2.7x10-9). We provide evidence from reporter gene assays, computational predictions and epigenomic marks that this polymorphism increases activity of an enhancer region active in multiple human tissues. The polymorphism was further reproducibly associated with a DNA methylation signature in whole blood (P = 4.5x10-40) that also associated with allergic sensitization and expression in blood of the cytokine TSLP (P = 1.1x10-4). Knockdown of the transcription factor predicted to bind the enhancer region (NHLH1) in a human cell line (HEK293) expressing NHLH1 resulted in lower TSLP expression. In addition, we observed evidence of recent positive selection acting on the risk allele in populations of African descent. Our findings provide novel genetic leads to factors that influence mortality in patients with heart failure.