The innate immune system represents an ancient host defence mechanism that protects against invading microorganisms. An important class of immune effector molecules to fight pathogen infections are antimicrobial peptides (AMPs) that are produced in plants and animals. In Drosophila, the induction of AMPs in response to infection is regulated through the activation of the evolutionarily conserved Toll and immune deficiency (IMD) pathways. Here we show that AMP activation can be achieved independently of these immunoregulatory pathways by the transcription factor FOXO, a key regulator of stress resistance, metabolism and ageing. In non-infected animals, AMP genes are activated in response to nuclear FOXO activity when induced by starvation, using insulin signalling mutants, or by applying small molecule inhibitors. AMP induction is lost in foxo null mutants but enhanced when FOXO is overexpressed. Expression of AMP genes in response to FOXO activity can also be triggered in animals unable to respond to immune challenges due to defects in both the Toll and IMD pathways. Molecular experiments at the Drosomycin promoter indicate that FOXO directly binds to its regulatory region, thereby inducing its transcription. In vivo studies in Drosophila, but also studies in human lung, gut, kidney and skin cells indicate that a FOXO-dependent regulation of AMPs is evolutionarily conserved. Our results indicate a new mechanism of cross-regulation of metabolism and innate immunity by which AMP genes can be activated under normal physiological conditions in response to the oscillating energy status of cells and tissues. This regulation seems to be independent of the pathogen-responsive innate immunity pathways whose activation is often associated with tissue damage and repair. The sparse production of AMPs in epithelial tissues in response to FOXO may help modulating the defence reaction without harming the host tissues, in particular when animals are suffering from energy shortage or stress.