Renal function is essential to maintain homeostasis. This is particularly significant for insects that undergo complete metamorphosis; larval mosquitoes must survive a freshwater habitat whereas adults are terrestrial, and mature females must maintain ion and fluid homeostasis after blood feeding. To investigate the physiological adaptations required for successful development to adulthood, we studied the Malpighian tubule transcriptome of Anopheles gambiae using Affymetrix arrays. We assessed transcription under several conditions; as third instar larvae, as adult males fed on sugar, as adult females fed on sugar, and adult females after a blood meal. In addition to providing the most detailed transcriptomic data to date on the Anopheles Malpighian tubules, the data provide unique information on the renal adaptations required for the switch from freshwater to terrestrial habitats, on gender differences, and on the contrast between nectar-feeding and haematophagy. We found clear differences associated with ontogenetic change in lifestyle, gender and diet, particularly in the neuropeptide receptors that control fluid secretion, and the water and ion transporters that impact volume and composition. These data were also combined with transcriptomics from the Drosophila melanogaster tubule, allowing meta-analysis of the genes which underpin tubule function across Diptera. To further investigate renal conservation across species we selected four Drosophila melanogaster genes with orthologues highly enriched in the Anopheles tubules, and generated RNAi knockdown flies. Three of these genes proved essential, showing conservation of critical functions across 150 million years of phylogenetic separation. This extensive data-set is available as an online resource, MozTubules.org, and could potentially be mined for novel insecticide targets that can impact this critical organ in this pest species.