Antimicrobial peptides (AMPs) are important defense molecules of the innate immune system. High levels of AMPs are induced in response to infections to fight pathogens, whereas moderate levels induced by metabolic stress are thought to shape commensal microbial communities at barrier tissues. We expressed single AMPs in adult flies either ubiquitously or in the gut by using the inducible GeneSwitch system to tightly regulate AMP expression. We found that activation of single AMPs, including Drosocin, resulted in a significant extension of Drosophila lifespan. These animals showed reduced activity of immune pathways over lifetime, less intestinal regenerative processes, reduced stress response and a delayed loss of gut barrier integrity. Furthermore, intestinal Drosocin induction protected the animals against infections with the natural Drosophila pathogen Pseudomonas entomophila, whereas a germ-reduced environment prevented the lifespan extending effect of Drosocin. Our study provides new insights into the crosstalk of innate immunity, intestinal homeostasis and ageing.