Hypercapnia, elevated partial pressure of CO2 in blood and tissue, develops in many patients with chronic severe obstructive pulmonary disease and other advanced lung disorders. Patients with advanced disease frequently develop bacterial lung infections, and hypercapnia is a risk factor for mortality in such individuals. We previously demonstrated that hypercapnia suppresses induction of NF-κB-regulated innate immune response genes required for host defense in human, mouse, and Drosophila cells, and it increases mortality from bacterial infections in both mice and Drosophila. However, the molecular mediators of hypercapnic immune suppression are undefined. In this study, we report a genome-wide RNA interference screen in Drosophila S2* cells stimulated with bacterial peptidoglycan. The screen identified 16 genes with human orthologs whose knockdown reduced hypercapnic suppression of the gene encoding the antimicrobial peptide Diptericin (Dipt), but did not increase Dipt mRNA levels in air. In vivo tests of one of the strongest screen hits, zinc finger homeodomain 2 (Zfh2; mammalian orthologs ZFHX3/ATBF1 and ZFHX4), demonstrate that reducing zfh2 function using a mutation or RNA interference improves survival of flies exposed to elevated CO2 and infected with Staphylococcus aureus. Tissue-specific knockdown of zfh2 in the fat body, the major immune and metabolic organ of the fly, mitigates hypercapnia-induced reductions in Dipt and other antimicrobial peptides and improves resistance of CO2-exposed flies to infection. Zfh2 mutations also partially rescue hypercapnia-induced delays in egg hatching, suggesting that Zfh2's role in mediating responses to hypercapnia extends beyond the immune system. Taken together, to our knowledge, these results identify Zfh2 as the first in vivo mediator of hypercapnic immune suppression.