ObjectiveWhile there are several trials that support the efficacy of various drugs for migraine prophylaxis against placebo, there is limited evidence addressing the comparative safety and efficacy of these drugs. We conducted a systematic review and network meta-analysis to facilitate comparison between drugs for migraine prophylaxis.MethodsWe searched MEDLINE, EMBASE, CENTRAL, and clinicaltrials.gov from inception to August 13, 2022, for randomized trials of pharmacological treatments for migraine prophylaxis in adults. Reviewers worked independently and in duplicate to screen references, extract data, and assess risk of bias. We performed a frequentist random-effects network meta-analysis and rated the certainty (quality) of evidence as either high, moderate, low, or very low using the GRADE approach.ResultsWe identified 74 eligible trials, reporting on 32,990 patients. We found high certainty evidence that monoclonal antibodies acting on the calcitonin gene related peptide or its receptor (CGRP(r)mAbs), gepants, and topiramate increase the proportion of patients who experience a 50% or more reduction in monthly migraine days, compared to placebo. We found moderate certainty evidence that beta-blockers, valproate, and amitriptyline increase the proportion of patients who experience a 50% or more reduction in monthly migraine days, and low certainty evidence that gabapentin may not be different from placebo. We found high certainty evidence that, compared to placebo, valproate and amitriptyline lead to substantial adverse events leading to discontinuation, moderate certainty evidence that topiramate, beta-blockers, and gabapentin increase adverse events leading to discontinuation, and moderate to high certainty evidence that (CGRP(r)mAbs) and gepants do not increase adverse events.Conclusions(CGRP(r)mAbs) have the best safety and efficacy profile of all drugs for migraine prophylaxis, followed closely by gepants.Supplementary InformationThe online version contains supplementary material available at 10.1186/s10194-023-01594-1.