Objectives To prospectively investigate the association between occupational physical activity (OPA) and disability pension due to musculoskeletal cause, mental cause or any cause. We also examined the combined association of OPA and leisure-time physical activity (LTPA) with disability pension. Methods A population-based cohort study in Norway on 32 362 persons aged 20–65 years with questionnaire data on OPA and LTPA that were followed up for incident disability pension through the National Insurance Database. We used Cox regression to estimate adjusted HRs with 95% CIs. Results During a follow-up of 9.3 years, 3837 (12%) received disability pension. Compared with people with mostly sedentary work, those who performed much walking, much walking and lifting, and heavy physical work had HRs of 1.26 (95% CI 1.16 to 1.38), 1.44 (95% CI 1.32 to 1.58) and 1.48 (95% CI 1.33 to 1.70), respectively. These associations were stronger for disability pension due to musculoskeletal disorders, whereas there was no clear association between OPA and risk of disability pension due to mental disorders. People with high OPA and low LTPA had a HR of 1.77 (95% CI 1.58 to 1.98) for overall disability pension and HR of 2.56 (95% CI 2.10 to 3.11) for disability pension due to musculoskeletal disorders, versus low OPA and high LTPA. Conclusions We observed a positive association between OPA and risk of disability pension due to all causes and musculoskeletal disorders, but not for mental disorders. Physical activity during leisure time reduced some, but not all of the unfavourable effect of physically demanding work on risk of disability pension.