Lung cancer risk is significantly increased among persons with AIDS (PWA), and increased smoking may not explain all of the elevated risk, suggesting a role for additional cofactors. We investigated whether AIDS-defining pulmonary infections (recurrent pneumonia, Pneumocystis jirovecii pneumonia, and pulmonary tuberculosis) affected the risk of subsequent lung cancer over 10 years after AIDS onset among 322,675 PWA, whose records were linked with cancer registries in 11 US regions. We assessed lung cancer hazard ratios (HRs) using Cox regression and indirectly adjusted HRs for confounding by smoking. Individuals with recurrent pneumonia (n = 5317) were at significantly higher lung cancer risk than those without [HR = 1.63, 95% confidence interval (CI) = 1.08 to 2.46, adjusted for age, race, sex, HIV acquisition mode, CD4 count, and AIDS diagnosis year]. This association was especially strong among young PWA (<50 years HR = 1.99 vs. ≥50 years HR = 1.10) and was significantly elevated during 5-10 years after recurrent pneumonia diagnosis (HR = 2.41; 95% CI = 1.07 to 5.47). Although attenuated, HRs for recurrent pneumonia remained nonsignificantly elevated after indirect adjustment for smoking. Lung cancer risk was unrelated to tuberculosis [(n = 13,878) HR = 1.12, 95% CI = 0.82 to 1.53] or Pneumocystis jirovecii pneumonia [(n = 69,771) HR = 0.97, 95% CI = 0.80 to 1.18]. The increased lung cancer risk associated with recurrent pneumonia supports the hypothesis that chronic pulmonary inflammation arising from infections contributes to lung carcinogenesis.