Type 2 diabetes mellitus has been associated with an increased risk of a variety of cancers in observational studies, but few have reported the relationship between diabetes and cancer risk in men and women separately. The main goal of this retrospective cohort study was to evaluate the sex-specific risk of incident overall and site-specific cancer among people with DM compared with those without, who had no reported history of cancer at the start of the follow-up in January 2000. During an average of 8 years of follow-up (SD = 2.5), we documented 1,639 and 7,945 incident cases of cancer among 16,721 people with DM and 83,874 free of DM, respectively. In women, DM was associated with an adjusted hazard ratio of 1.96 (95% CI: 1.53-2.50) and 1.41 (95% CI: 1.20-1.66) for cancers of genital organs and digestive organs, respectively. A significantly reduced HR was observed for skin cancer (0.38; 95% CI: 0.22-0.66). In men with DM, there was no significant increase in overall risk of cancer. DM was related with a 47% reduction in the risk of prostate cancer. These findings suggest that the nature of the association between DM and cancer depends on sex and specific cancer site.