During bacterial infection, the host is confronted with multiple overlapping signals that are integrated at the organismal level to produce defensive host responses. How multiple infection signals are sensed by the host and how they elicit the transcription of host defense genes is much less understood at the whole-animal level than at the cellular level. The model organism Caenorhabditis elegans is known to mount transcriptional defense responses against intestinal bacterial infections that elicit overlapping starvation and infection responses, but the regulation of such responses is not well understood. Direct comparison of C. elegans that were starved or infected with Staphylococcus aureus revealed a large infection-specific transcriptional signature. This signature was almost completely abrogated by deletion of transcription factor hlh-30/TFEB, except for six genes including a flavin-containing monooxygenase (FMO) gene, fmo-2/FMO5. Deletion of fmo-2/FMO5 severely compromised infection survival, thus identifying the first FMO with innate immunity functions in animals. Moreover, the mechanism of fmo-2/FMO5 induction required the nuclear hormone receptor, NHR-49/PPAR-α, which induced fmo-2/FMO5 and host defense cell non-autonomously. These findings for the first time reveal an infection-specific host response to S. aureus, identify HLH-30/TFEB as its main regulator, reveal that FMOs are important innate immunity effectors in animals, and identify the mechanism of FMO regulation through NHR-49/PPAR-α in C. elegans, with important implications for innate host defense in higher organisms.