Iron sequestration is a recognized innate immune mechanism against invading pathogens mediated by iron-binding proteins called transferrins. Despite many studies on antimicrobial activity of transferrins in vitro, their specific in vivo functions are poorly understood. Here we use Drosophila melanogaster as an in vivo model to investigate the role of transferrins in host defense. We find that systemic infections with a variety of pathogens trigger a hypoferremic response in flies, namely, iron withdrawal from the hemolymph and accumulation in the fat body. Notably, this hypoferremia to infection requires Drosophila nuclear factor κB (NF-κB) immune pathways, Toll and Imd, revealing that these pathways also mediate nutritional immunity in flies. Next, we show that the iron transporter Tsf1 is induced by infections downstream of the Toll and Imd pathways and is necessary for iron relocation from the hemolymph to the fat body. Consistent with elevated iron levels in the hemolymph, Tsf1 mutants exhibited increased susceptibility to Pseudomonas bacteria and Mucorales fungi, which could be rescued by chemical chelation of iron. Furthermore, using siderophore-deficient Pseudomonas aeruginosa, we discover that the siderophore pyoverdine is necessary for pathogenesis in wild-type flies, but it becomes dispensable in Tsf1 mutants due to excessive iron present in the hemolymph of these flies. As such, our study reveals that, similar to mammals, Drosophila uses iron limitation as an immune defense mechanism mediated by conserved iron-transporting proteins transferrins. Our in vivo work, together with accumulating in vitro studies, supports the immune role of insect transferrins against infections via an iron withholding strategy.