Laboratory studies have suggested oncogenic roles of lipids, as well as anticarcinogenic effects of statins. We here assess the potential effect of statin therapy on cancer risk in Mendelian randomization analyses. We obtained genetic associations with the risk of overall and 22 site-specific cancers for 367,703 individuals in UK Biobank. In total, 75,037 individuals had a cancer event. Variants in the HMGCR gene region, which represent proxies for statin treatment, were associated with overall cancer risk (OR per 1 standard deviation increase in LDL-cholesterol 1.32, 95% CI 1.13-1.53, p=0.0003), but variants in gene regions representing alternative lipid-lowering treatment targets (PCSK9, LDLR, NPC1L1, APOC3, LPL) were not. Genetically-predicted LDL-cholesterol was not associated with overall cancer risk (OR 1.01, 95% CI 0.98-1.05, p=0.50). Our results predict that statins reduce cancer risk, but other lipid-lowering treatments do not. This suggests that statins reduce cancer risk through a cholesterol independent pathway.