Objective: To assess the benefits and harms of different types and doses of anticoagulant drugs for the prevention of venous thromboembolism in patients who are acutely ill and admitted to hospital. Design: Systematic review and network meta-analysis. Data sources: Cochrane CENTRAL, PubMed/Medline, Embase, Web of Science, clinical trial registries, and national health authority databases. The search was last updated on 16 November 2021. Eligibility criteria for selecting studies: Published and unpublished randomised controlled trials that evaluated low or intermediate dose low-molecular-weight heparin, low or intermediate dose unfractionated heparin, direct oral anticoagulants, pentasaccharides, placebo, or no intervention for the prevention of venous thromboembolism in acutely ill adult patients in hospital. Main outcome measures: Random effects, bayesian network meta-analyses used four co-primary outcomes: all cause mortality, symptomatic venous thromboembolism, major bleeding, and serious adverse events at or closest timing to 90 days. Risk of bias was also assessed using the Cochrane risk-of-bias 2.0 tool. The quality of evidence was graded using the Confidence in Network Meta-Analysis framework. Results: 44 randomised controlled trials that randomly assigned 90 095 participants were included in the main analysis. Evidence of low to moderate quality suggested none of the interventions reduced all cause mortality compared with placebo. Pentasaccharides (odds ratio 0.32, 95% credible interval 0.08 to 1.07), intermediate dose low-molecular-weight heparin (0.66, 0.46 to 0.93), direct oral anticoagulants (0.68, 0.33 to 1.34), and intermediate dose unfractionated heparin (0.71, 0.43 to 1.19) were most likely to reduce symptomatic venous thromboembolism (very low to low quality evidence). Intermediate dose unfractionated heparin (2.63, 1.00 to 6.21) and direct oral anticoagulants (2.31, 0.82 to 6.47) were most likely to increase major bleeding (low to moderate quality evidence). No conclusive differences were noted between interventions regarding serious adverse events (very low to low quality evidence). When compared with no intervention instead of placebo, all active interventions did more favourably with regard to risk of venous thromboembolism and mortality, and less favourably with regard to risk of major bleeding. The results were robust in prespecified sensitivity and subgroup analyses. Conclusions: Low-molecular-weight heparin in an intermediate dose appears to confer the best balance of benefits and harms for prevention of venous thromboembolism. Unfractionated heparin, in particular the intermediate dose, and direct oral anticoagulants had the least favourable profile. A systematic discrepancy was noted in intervention effects that depended on whether placebo or no intervention was the reference treatment. Main limitations of this study include the quality of the evidence, which was generally low to moderate due to imprecision and within-study bias, and statistical inconsistency, which was addressed post hoc.