Studies of sleep duration in relation to the risk of site‐specific cancers other than breast cancer are scarce. Furthermore, the available results are inconclusive and the causality remains unclear. We aimed to investigate the potential causal associations of sleep duration with overall and site‐specific cancers using the Mendelian randomization (MR) design. Single‐nucleotide polymorphisms associated with the sleep traits identified from a genome‐wide association study were used as instrumental variables to estimate the association with overall cancer and 22 site‐specific cancers among 367 586 UK Biobank participants. A replication analysis was performed using data from the FinnGen consortium (up to 121 579 individuals). There was suggestive evidence that genetic liability to short‐sleep duration was associated with higher odds of cancers of the stomach (odds ratio [OR], 2.22; 95% confidence interval [CI], 1.15‐4.30; P = .018), pancreas (OR, 2.18; 95% CI, 1.32‐3.62; P = .002) and colorectum (OR, 1.48; 95% CI, 1.12‐1.95; P = .006), but with lower odds of multiple myeloma (OR, 0.47; 95% CI, 0.22‐0.99; P = .047). Suggestive evidence of association of genetic liability to long‐sleep duration with lower odds of pancreatic cancer (OR, 0.44; 95% CI, 0.25‐0.79; P = .005) and kidney cancer (OR, 0.44; 95% CI, 0.21‐0.90; P = .025) was observed. However, none of these associations passed the multiple comparison threshold and two‐sample MR analysis using FinnGen data did not confirm these findings. In conclusion, this MR study does not provide strong evidence to support causal associations of sleep duration with risk of overall and site‐specific cancers. Further MR studies are required.