We examined the risk of cancer and survival in a cohort of patients hospitalised with herpes zoster between 1977 and 1996, drawn from the Danish National Registry of Patients. Through linkage with the Danish Cancer Registry, we compared the observed number of cancers with the expected number on the basis of national age-, gender-, and site-specific incidence rates. The survival of herpes zoster patients with cancer was compared with that of non-herpes zoster patients with cancer. Among the 10 588 patients hospitalised with herpes zoster whom we identified, 1427 cancers were observed compared with 1239 expected (relative risk ¼ 1.2, 95% confidence interval 1.1 -1.2). The risk was substantially elevated during the first year of follow-up, mainly for haematological cancer. Patients with cancer within 1 year of follow-up had a higher prevalence of distant metastases than controls, although the mortality was similar. For those with haematological cancer, however, the mortality was higher for herpes zoster patients than for controls. Haematological cancer following hospitalisation for herpes zoster has a poorer prognosis than in non-herpes zoster patients.