Rationale: Idiopathic pulmonary fibrosis (IPF) is a devastating lung disease of unknown etiology. The genes TOLLIP and MUC5B play important roles in lung host defense, which is an immune process influenced by oxidative signaling. Whether polymorphisms in TOLLIP and MUC5B modify the effect of immunosuppressive and antioxidant therapy in individuals with IPF is unknown.Objectives: To determine whether single-nucleotide polymorphisms (SNPs) within TOLLIP and MUC5B modify the effect of interventions in subjects participating in the Evaluating the Effectiveness of Prednisone, Azathioprine, and N-Acetylcysteine in Patients with Idiopathic Pulmonary Fibrosis (PANTHER-IPF) clinical trial.Methods: SNPs within TOLLIP (rs5743890/rs5743894/rs5743854/ rs3750920) and MUC5B (rs35705950) were genotyped. Interaction modeling was conducted with multivariable Cox regression followed by genotype-stratified survival analysis using a composite endpoint of death, transplantation, hospitalization, or a decline of >10% in FVC.Measurements and Main Results: Significant interaction was observed between N-acetylcysteine (NAC) therapy and rs3750920 within TOLLIP (P interaction = 0.001). After stratifying by rs3750920 genotype, NAC therapy was associated with a significant reduction in composite endpoint risk (hazard ratio, 0.14; 95% confidence interval, 0.02-0.83; P = 0.03) in those with a TT genotype, but a nonsignificant increase in composite endpoint risk (hazard ratio, 3.23; 95% confidence interval, 0.79-13.16; P = 0.10) was seen in those with a CC genotype. These findings were then replicated in an independent IPF cohort.Conclusions: NAC may be an efficacious therapy for individuals with IPF with an rs3750920 (TOLLIP) TT genotype, but it was associated with a trend toward harm in those with a CC genotype. A genotype-stratified prospective clinical trial should be conducted before any recommendation regarding the use of off-label NAC to treat IPF.