Frozen shoulder is a painful condition that often requires surgery and affects up to 5% of individuals aged 40-60 years. Little is known about the causes of the condition, but diabetes is a strong risk factor. To begin to understand the biological mechanisms involved, we aimed to identify genetic variants associated with frozen shoulder and to use Mendelian randomization to test the causal role of diabetes. We performed a genome-wide association study (GWAS) of frozen shoulder in the UK Biobank using data from 10,104 cases identified from inpatient, surgical and primary care codes. We used data from FinnGen for replication and meta-analysis. We used one-sample and two-sample Mendelian randomization approaches to test for a causal association of diabetes with frozen shoulder. We identified five genome-wide significant loci. The most significant locus (lead SNP rs28971325; OR = 1.20, [95% CI: 1.16-1.24], p = 5x10-29) contained WNT7B. This variant was also associated with Dupuytren's disease (OR = 2.31 [2.24, 2.39], p<1x10-300) as were a further two of the frozen shoulder associated variants. The Mendelian randomization results provided evidence that type 1 diabetes is a causal risk factor for frozen shoulder (OR = 1.03 [1.02-1.05], p = 3x10-6). There was no evidence that obesity was causally associated with frozen shoulder, suggesting that diabetes influences risk of the condition through glycemic rather than mechanical effects. We have identified genetic loci associated with frozen shoulder. There is a large overlap with Dupuytren's disease associated loci. Diabetes is a likely causal risk factor. Our results provide evidence of biological mechanisms involved in this common painful condition.