ImportanceCertain antibiotic exposures have been associated with increased rates of acute graft-vs-host disease (aGVHD) after allogeneic hematopoietic cell transplantation (allo-HCT). Since antibiotic exposure can both affect and be affected by infections, analyzing time-dependent exposure in the presence of multiple potential confounders, including prior antibiotic exposures, poses specific analytical challenges, necessitating both a large sample size and unique approaches.ObjectiveTo identify antibiotics and antibiotic exposure timeframes associated with subsequent aGVHD.Design, Setting, and ParticipantsThis cohort study assessed allo-HCT at a single center from 2010 to 2021. Participants included all patients aged at least 18 years who underwent their first T-replete allo-HCT, with at least 6 months of follow-up. Data were analyzed from August 1 to December 15, 2022.ExposuresAntibiotics between 7 days before and 30 days after transplant.Main Outcomes and MeasuresThe primary outcome was grade II to IV aGVHD. The secondary outcome was grade III to IV aGVHD. Data were analyzed using 3 orthogonal methods: conventional Cox proportional hazard regression, marginal structural models, and machine learning.ResultsA total of 2023 patients (median [range] age, 55 [18-78] years; 1153 [57%] male) were eligible. Weeks 1 and 2 after HCT were the highest-risk intervals, with multiple antibiotic exposures associated with higher rates of subsequent aGVHD. In particular, exposure to carbapenems during weeks 1 and 2 after allo-HCT was consistently associated with increased risk of aGVHD (minimum hazard ratio [HR] among models, 2.75; 95% CI, 1.77-4.28), as was week 1 after allo-HCT exposure to combinations of penicillins with a β-lactamase inhibitor (minimum HR among models, 6.55; 95% CI, 2.35-18.20).Conclusions and RelevanceIn this cohort study of allo-HCT recipients, antibiotic choices and schedules in the early course of transplantation were associated with aGVHD rates. These findings should be considered in antibiotic stewardship programs.