Alternative splicing underpins functional diversity in proteins and the complexity and diversity of eukaryotes. An example is the doublesex gene, the key transcriptional factor in arthropod sexual differentiation. doublesex is controlled by sex-specific splicing and promotes both male and female differentiation in holometabolan insects, whereas in hemimetabolan species, doublesex has sex-specific isoforms but is not required for female differentiation. How doublesex evolved to be essential for female development remains largely unknown. Here, we investigate ancestral states of doublesex using Thermobia domestica belonging to Zygentoma, the sister group of Pterygota, that is, winged insects. We find that, in T. domestica, doublesex expresses sex-specific isoforms but is only necessary for male differentiation of sexual morphology. This result supports the hypothesis that doublesex initially promoted male differentiation during insect evolution. However, T. domestica doublesex has a short female-specific region and upregulates the expression of vitellogenin homologs in females, suggesting that doublesex may already play some role in female morphogenesis of the common ancestor of Pterygota. Reconstruction of the ancestral sequence and prediction of protein structures show that the female-specific isoform of doublesex has an extended C-terminal disordered region in holometabolan insects but not in nonholometabolan species. We propose that doublesex acquired its function in female morphogenesis through a change in the protein motif structure rather than the emergence of the female-specific exon.