Insects are the only known animals in which sexual differentiation is controlled by sex-specific splicing. The doublesex transcription factor produces distinct male and female isoforms, which are both essential for sex-specific development. dsx splicing depends on transformer, which is also alternatively spliced such that functional Tra is only present in females. This pathway has evolved from an ancestral mechanism where dsx was independent of tra and expressed and required only in males. To reconstruct this transition, we examined three basal, hemimetabolous insect orders: Hemiptera, Phthiraptera, and Blattodea. We show that tra and dsx have distinct functions in these insects, reflecting different stages in the changeover from a transcription-based to a splicing-based mode of sexual differentiation. We propose that the canonical insect tra-dsx pathway evolved via merger between expanding dsx function (from males to both sexes) and narrowing tra function (from a general splicing factor to dedicated regulator of dsx).