Systemic immune response via the Immune deficiency pathway requires Drosophila inhibitor of apoptosis protein 2 to activate the NF-κB transcription factor Relish. Malpighian tubules (MTs), simple epithelial tissue, are the primary excretory organs, performing additional role in providing protection to Drosophila against pathogenic infections. MTs hold a strategic position in Drosophila as one of the larval tissues that are carried over to adults, unlike other larval tissues that are histolysed during pupation. In this paper we show that Diap2 is an important regulator of local epithelial immune response in MTs and depletion of Diap2 from MTs, increases susceptibility of flies to infection. In the absence of Diap2, activation and translocation of Relish to the nucleus is abolished and as a consequence the production of IMD pathway dependent AMPs are reduced. Ion channels, (Na(+)/K(+))-ATPase and V-ATPase, are important for the immune response of MTs and expression of AMPs and the IMD pathway genes are impaired on inhibition of transporters, and they restrict the translocation of Relish into the nucleus. We show that Diap2 could be regulating ion channels, as loss of Diap2 consequently reduces the expression of ion channels and affects the balance of ion concentrations which results in reduced uric acid deposition. Thus Diap2 seems to be a key regulator of epithelial immune response in MTs, perhaps by modulating ion channels.