The relationship between psychotic disorders and cannabis use is heavily debated. Shared underlying genetic risk is one potential explanation. We investigated the genetic association between psychotic disorders (schizophrenia and bipolar disorder) and cannabis phenotypes (lifetime cannabis use and cannabis use disorder). We used genome-wide association summary statistics from individuals with European ancestry from the Psychiatric Genomics Consortium, UK Biobank, and International Cannabis Consortium. We estimated heritability, polygenicity, and discoverability of each phenotype. We performed genome-wide and local genetic correlations. Shared loci were identified and mapped to genes, which were tested for functional enrichment. Shared genetic liabilities to psychotic disorders and cannabis phenotypes were explored using causal analyses and polygenic scores, using the Norwegian Thematically Organized Psychosis cohort. Psychotic disorders were more heritable than cannabis phenotypes and more polygenic than cannabis use disorder. We observed positive genome-wide genetic correlations between psychotic disorders and cannabis phenotypes (range 0·22-0·35) with a mixture of positive and negative local genetic correlations. Three to 27 shared loci were identified for the psychotic disorder and cannabis phenotype pairs. Enrichment of mapped genes implicated neuronal and olfactory cells as well as drug-gene targets for nicotine, alcohol, and duloxetine. Psychotic disorders showed a causal effect on cannabis phenotypes, and lifetime cannabis use had a causal effect on bipolar disorder. Of 2181 European participants from the Norwegian Thematically Organized Psychosis cohort applied in polygenic risk score analyses, 1060 (48·6%) were females and 1121 (51·4%) were males (mean age 33·1 years [SD 11·8]). 400 participants had bipolar disorder, 697 had schizophrenia, and 1044 were healthy controls. Within this sample, polygenic scores for cannabis phenotypes predicted psychotic disorders independently and improved prediction beyond the polygenic score for the psychotic disorders. A subgroup of individuals might have a high genetic risk of developing a psychotic disorder and using cannabis. This finding supports public health efforts to reduce cannabis use, particularly in individuals at high risk or patients with psychotic disorders. Identified shared loci and their functional implications could facilitate development of novel treatments. US National Institutes of Health, the Research Council Norway, the South-East Regional Health Authority, Stiftelsen Kristian Gerhard Jebsen, EEA-RO-NO-2018-0535, European Union's Horizon 2020 Research and Innovation Programme, the Marie Skłodowska-Curie Actions, and University of Oslo Life Science.