The functional kidney in insects consists of the Malpighian tubules and hindgut. Malpighian tubules secrete ions and fluid aiding in hydromineral homeostasis, acid-base balance, and metabolic waste excretion. In many insects, including lepidopterans, the Malpighian tubule epithelium consists of principal cells (PCs) and secondary cells (SCs). The SCs in the Malpighian tubules of larvae of the lepidopteran Trichoplusia ni have been shown to reabsorb K+, transporting it in a direction opposite to that in the neighbouring PCs that secrete K+. One of the mechanisms that could enable such an arrangement is a gap junction (GJ)-based coupling of the two cell types. In the current study, we have immunolocalised GJ protein Innexin-2 to the PC-PC and SC-PC cell-cell borders. We have demonstrated that GJs in the SC-containing region of the Malpighian tubules enable Na+ and K+ reabsorption by the SCs. We also demonstrated that in ion-loaded animals PCs switch from Na+/K+ secretion to reabsorption, resulting in an ion-transporting phenotype similar to that of tubules with pharmacologically blocked GJs. Concomitantly, mRNA abundance encoding GJ proteins was downregulated. Finally, we observed that such PC-based reabsorption was only present in the distal ileac plexus connected to the rectal complex. We propose that this plasticity in the PC function in the distal ileac plexus is likely to be aimed at providing ion supply for the SC function in this segment of the tubule.