In this study, we aimed to provide novel evidence on the impact of changing lifestyle habits on cancer risk. In the EPIC cohort, 295,865 middle-aged participants returned a lifestyle questionnaire at baseline and during follow-up. At both timepoints, we calculated a healthy lifestyle index (HLI) score based on cigarette smoking, alcohol consumption, body mass index and physical activity. HLI ranged from 0 (most unfavourable) to 16 (most favourable). We estimated the association between HLI change and risk of lifestyle-related cancers—including cancer of the breast, lung, colorectum, stomach, liver, cervix, oesophagus, bladder, and others—using Cox regression models. We reported hazard ratios (HR) with 95% confidence intervals (CI). Median time between the two questionnaires was 5.7 years, median age at follow-up questionnaire was 59 years. After the follow-up questionnaire, we observed 14,933 lifestyle-related cancers over a median follow-up of 7.8 years. Each unit increase in the HLI score was associated with 4% lower risk of lifestyle-related cancers (HR 0.96; 95%CI 0.95–0.97). Among participants in the top HLI third at baseline (HLI > 11), those in the bottom third at follow-up (HLI ≤ 9) had 21% higher risk of lifestyle-related cancers (HR 1.21; 95%CI 1.07–1.37) than those remaining in the top third. Among participants in the bottom HLI third at baseline, those in the top third at follow-up had 25% lower risk of lifestyle-related cancers (HR 0.75; 95%CI 0.65–0.86) than those remaining in the bottom third. These results indicate that lifestyle changes in middle age may have a significant impact on cancer risk.