Importance: Biologic mesh is widely used for reinforcing contaminated ventral hernia repairs; however, it is expensive and has been associated with high rates of long-term hernia recurrence. Synthetic mesh is a lower-cost alternative but its efficacy has not been rigorously studied in individuals with contaminated hernias. Objective: To determine whether synthetic mesh results in superior reduction in risk of hernia recurrence compared with biologic mesh during the single-stage repair of clean-contaminated and contaminated ventral hernias. Design, Setting, and Participants: This multicenter, single-blinded randomized clinical trial was conducted from December 2012 to April 2019 with a follow-up duration of 2 years. The trial was completed at 5 academic medical centers in the US with specialized units for abdominal wall reconstruction. A total of 253 adult patients with clean-contaminated or contaminated ventral hernias were enrolled in this trial. Follow-up was completed in April 2021. Interventions: Retromuscular synthetic or biologic mesh at the time of fascial closure. Main Outcomes and Measures: The primary outcome was the superiority of synthetic mesh vs biologic mesh at reducing risk of hernia recurrence at 2 years based on intent-to-treat analysis. Secondary outcomes included mesh safety, defined as the rate of surgical site occurrence requiring a procedural intervention, and 30-day hospital direct costs and prosthetic costs. Results: A total of 253 patients (median [IQR] age, 64 [55-70] years; 117 [46%] male) were randomized (126 to synthetic mesh and 127 to biologic mesh) and the follow-up rate was 92% at 2 years. Compared with biologic mesh, synthetic mesh significantly reduced the risk of hernia recurrence (hazard ratio, 0.31; 95% CI, 0.23-0.42; P <.001). The overall intent-to-treat hernia recurrence risk at 2 years was 13% (33 of 253 patients). Recurrence risk with biologic mesh was 20.5% (26 of 127 patients) and with synthetic mesh was 5.6% (7 of 126 patients), with an absolute risk reduction of 14.9% with the use of synthetic mesh (95% CI, -23.8% to -6.1%; P =.001). There was no significant difference in overall 2-year risk of surgical site occurrence requiring a procedural intervention between the groups (odds ratio, 1.22; 95% CI, 0.60-2.44; P =.58). Median (IQR) 30-day hospital direct costs were significantly greater in the biologic group vs the synthetic group ($44936 [$35877-$52656] vs $17289 [$14643-$22901], respectively; P <.001). There was also a significant difference in the price of the prosthetic device between the 2 groups (median [IQR] cost biologic, $21539 [$20285-$23332] vs synthetic, $105 [$105-$118]; P <.001). Conclusions and Relevance: Synthetic mesh demonstrated superior 2-year hernia recurrence risk compared with biologic mesh in patients undergoing single-stage repair of contaminated ventral hernias, and both meshes demonstrated similar safety profiles. The price of biologic mesh was over 200 times that of synthetic mesh for these outcomes. Trial Registration: ClinicalTrials.gov Identifier: NCT02451176.