Infection with Epstein–Barr virus (EBV) followed by infectious mononucleosis (IM) is now considered to be a risk factor for Hodgkin's disease (HD). It is less clear whether EBV infection and IM are associated with an increased risk of cancer generally. We used a longstanding record-linkage dataset in Oxford (years 1963–1998), and a more recent record-linkage dataset covering England (1999–2005), to compare rate ratios for cancer between people admitted to hospital for IM and a reference cohort. In the Oxford cohort, there was an increased risk of subsequent HD [rate ratio (RR) 6·0, 95% confidence interval (CI) 2·4–12·5] but not of other cancers combined (RR 0·85, 95% CI 0·57–1·23). In the England cohort, there were increased risks of HD (RR 3·2, 95% CI 1·2–7·0), non-Hodgkin's lymphoma (RR 5·6, 95% CI 2·9–9·8), and oropharyngeal cancer (RR 5·4, 95% CI 1·1–16·2), but no significant overall risk of cancer when lymphomas were excluded (RR 1·01, 95% CI 0·71–1·41). We confirm an association between IM and lymphoma; but the risk, if any, of cancer more generally is likely to be small.