Pancreatic cancer is the eighth major form of cancer-related death worldwide, causing 227 000 deaths annually. Type-II diabetes is widely considered to be associated with pancreatic cancer, but whether this represents a causal or consequential association is unclear. We conducted a meta-analysis to examine this association. A computer-based literature search from 1966 to 2005 yielded 17 case–control and 19 cohort or nested case–control studies with information on 9220 individuals with pancreatic cancer. The age and sex-adjusted odds ratio (OR) for pancreatic cancer associated with type-II diabetes was obtained from each study. The combined summary odds ratio was 1.82 (95% confidence interval (95% CI) 1.66–1.89), with evidence of heterogeneity across the studies ( P=0.002 for case–control and P=0.05 for cohort studies) that was explained, in part, by higher risks being reported by smaller studies and studies that reported before 2000. Individuals in whom diabetes had only recently been diagnosed (<4 years) had a 50% greater risk of the malignancy compared with individuals who had diabetes for ⩾5 years (OR 2.1 vs 1.5; P=0.005). These results support a modest causal association between type-II diabetes and pancreatic cancer.