Heart failure (HF) is associated with morbidity, rehospitalization and polypharmacy. The incidence rate of mortality in HF patients with polypharmacy is poorly studied. We examine the association of polypharmacy with mortality risk in incident hospitalized HF patients with a primary diagnosis after discharge from the hospital using Quebec administrative databases, Canada from 1999 to 2015. Polypharmacy, cardiovascular (CV) polypharmacy and non-CV polypharmacy were respectively defined as exposure to ≥ 10 drugs, ≥ 5 CV drugs and ≥ 5 non-CV drugs within three months prior to the case or the control selection date. We conducted a nested case–control study to estimate rate ratios (RR) of all-cause mortality using a multivariate conditional logistic regression during one-year of follow-up. We identified 12,242 HF patients with a mean age of 81.6 years. Neither CV polypharmacy (RR 0.97, 95%CI 0.82–1.15) nor non-CV polypharmacy (RR 0.93, 95%CI 0.77–1.12) were associated with lower mortality risk. However, all polypharmacy (RR 1.31, 95%CI 1.07–1.61) showed an association with mortality risk. Myocardial infarction, valvular disease, peripheral artery disease, diabetes, major bleeding, chronic kidney disease, high comorbidity score, high Frailty score, hydralazine and spironolactone users were associated with increasing mortality risk, ranging from 15 to 61%, while use of angiotensin II inhibitors, beta-blockers, statins, anticoagulant, and antiplatelets were associated with lower risk, ranging from 23 to 32%.