The physiological activities of organs are underpinned by an interplay between the distinct cell types they contain. However, little is known about the genetic control of patterned cell differentiation during organ development. We show that the conserved Teashirt transcription factors are decisive for the differentiation of a subset of secretory cells, stellate cells, in Drosophila melanogaster renal tubules. Teashirt controls the expression of the water channel Drip, the chloride conductance channel CLC-a and the Leukokinin receptor (LKR), all of which characterise differentiated stellate cells and are required for primary urine production and responsiveness to diuretic stimuli. Teashirt also controls a dramatic transformation in cell morphology, from cuboidal to the eponymous stellate shape, during metamorphosis. teashirt interacts with cut, which encodes a transcription factor that underlies the differentiation of the primary, principal secretory cells, establishing a reciprocal negative-feedback loop that ensures the full differentiation of both cell types. Loss of teashirt leads to ineffective urine production, failure of homeostasis and premature lethality. Stellate cell-specific expression of the teashirt paralogue tiptop, which is not normally expressed in larval or adult stellate cells, almost completely rescues teashirt loss of expression from stellate cells. We demonstrate conservation in the expression of the family of tiptop/teashirt genes in lower insects and establish conservation in the targets of Teashirt transcription factors in mouse embryonic kidney.