Liability to cannabis use disorder and maximum cannabis use frequency in the UK Biobank were genetically correlated (rg 0·75, p=1·80 × 10−6). PRS for cannabis use disorder were significantly associated with our pseudocontinuous measure of cannabis use frequency in the UK Biobank (maximum R2 0·04%, Z 7·42, p=1·15 × 10−13, threshold p<0·3; appendix p 18, 30). 65 of 12 461 gene sets and pathways were significantly enriched, highlighting involvement of CNS morphogenesis (transcription factor Nkx–2·2 target genes, R2 0·02%, Z 4·46, p=8·22 × 10−6) and immune responses to exogenous compounds (ZFP91 target genes R2 0·01%, Z 4·41, p=1·01 × 10−5; CD4+ T-cell R2 0·02%, Z 4·41, p=3·79 × 10−6; and macrophage gene sets R2 0·01%, Z 4·62, p=1·04 × 10−5; appendix p 18).