Background A substantial and unmet clinical need exists for pharmacological treatment of cannabis use disorders. Cannabidiol could offer a novel treatment, but it is unclear which doses might be efficacious or safe. Therefore, we aimed to identify efficacious doses and eliminate inefficacious doses in a phase 2a trial using an adaptive Bayesian design. Methods: We did a phase 2a, double-blind, placebo-controlled, randomised, adaptive Bayesian trial at the Clinical Psychopharmacology Unit (University College London, London, UK). We used an adaptive Bayesian dose-finding design to identify efficacious or inefficacious doses at a-priori interim and final analysis stages. Participants meeting cannabis use disorder criteria from DSM-5 were randomly assigned (1:1:1:1) in the first stage of the trial to 4-week treatment with three different doses of oral cannabidiol (200 mg, 400 mg, or 800 mg) or with matched placebo during a cessation attempt by use of a double-blinded block randomisation sequence. All participants received a brief psychological intervention of motivational interviewing. For the second stage of the trial, new participants were randomly assigned to placebo or doses deemed efficacious in the interim analysis. The primary objective was to identify the most efficacious dose of cannabidiol for reducing cannabis use. The primary endpoints were lower urinary 11-nor-9-carboxy-δ-9-tetrahydrocannabinol (THC-COOH):creatinine ratio, increased days per week with abstinence from cannabis during treatment, or both, evidenced by posterior probabilities that cannabidiol is better than placebo exceeding 0·9. All analyses were done on an intention-to-treat basis. This trial is registered with ClinicalTrials.gov (NCT02044809) and the EU Clinical Trials Register (2013-000361-36). Findings: Between May 28, 2014, and Aug 12, 2015 (first stage), 48 participants were randomly assigned to placebo (n=12) and to cannabidiol 200 mg (n=12), 400 mg (n=12), and 800 mg (n=12). At interim analysis, cannabidiol 200 mg was eliminated from the trial as an inefficacious dose. Between May 24, 2016, and Jan 12, 2017 (second stage), randomisation continued and an additional 34 participants were allocated (1:1:1) to cannabidiol 400 mg (n=12), cannabidiol 800 mg (n=11), and placebo (n=11). At final analysis, cannabidiol 400 mg and 800 mg exceeded primary endpoint criteria (0·9) for both primary outcomes. For urinary THC-COOH:creatinine ratio, the probability of being the most efficacious dose compared with placebo given the observed data was 0·9995 for cannabidiol 400 mg and 0·9965 for cannabidiol 800 mg. For days with abstinence from cannabis, the probability of being the most efficacious dose compared with placebo given the observed data was 0·9966 for cannabidiol 400 mg and 0·9247 for cannabidiol 800 mg. Compared with placebo, cannabidiol 400 mg decreased THC-COOH:creatinine ratio by −94·21 ng/mL (95% interval estimate −161·83 to −35·56) and increased abstinence from cannabis by 0·48 days per week (0·15 to 0·82). Compared with placebo, cannabidiol 800 mg decreased THC-COOH:creatinine ratio by −72·02 ng/mL (−135·47 to −19·52) and increased abstinence from cannabis by 0·27 days per week (−0·09 to 0·64). Cannabidiol was well tolerated, with no severe adverse events recorded, and 77 (94%) of 82 participants completed treatment. Interpretation: In the first randomised clinical trial of cannabidiol for cannabis use disorder, cannabidiol 400 mg and 800 mg were safe and more efficacious than placebo at reducing cannabis use. Funding: Medical Research Council.