Helicobacter pylori (HP) infection is associated with reduced lung function and systemic inflammation in chronic obstructive pulmonary disease (COPD) patients. Azithromycin (AZ) is active against HP and reduces the risk of COPD exacerbation. We determined whether HP infection status modifies the effects of AZ in COPD patients.Plasma samples from 1018 subjects with COPD who participated in the Macrolide Azithromycin (MACRO) in COPD Study were used to determine the HP infection status at baseline and 12 months of follow-up using a serologic assay. Based on HP infection status and randomization to either AZ or placebo (PL), the subjects were divided into 4 groups: HP+/AZ, HP-/AZ, HP+/PL, and HP-/PL. Time to first exacerbation was compared across the 4 groups using Kaplan-Meier survival analysis and a Cox proportional hazards model. The rates of exacerbation were compared using both the Kruskal-Wallis test and negative binomial analysis. Blood biomarkers at enrolment and at follow-up visits 3, 12, and 13 (1 month after treatment was stopped) months were measured.One hundred eighty one (17.8%) patients were seropositive to HP. Non-Caucasian participants were nearly three times more likely to be HP seropositive than Caucasian participants (37.4% vs 13.6%; p < 0.001). The median time to first exacerbation was significantly different across the four groups (p = 0.001) with the longest time in the HP+/AZ group (11.2 months, 95% CI; 8.4-12.5+) followed by the HP-/AZ group (8.0 months, 95% CI; 6.7-9.7). Hazard ratio (HR) for exacerbations was lowest in the HP+/AZ group after adjustment for age, sex, smoking status, ethnicity, history of peptic ulcer, dyspnea, previous hospital admission, GOLD grade of severity, and forced vital capacity (HR, 0.612; 95% CI, 0.442-0.846 vs HR, 0.789; 95% CI, 0.663-0.938 in the HP-/AZ group). Circulating levels of soluble tumor necrosis factor receptor-75 were reduced only in the HP+/AZ group after 3 months of AZ treatment (-0.87 ± 0.31 μg/L; p = 0.002); levels returned to baseline after discontinuing AZ.AZ is effective in preventing COPD exacerbations in patients with HP seropositivity, possibly by modulating TNF pathways related to HP infection.