Across species, animals have diverse sex determination pathways, each consisting of a hierarchical cascade of genes and its associated regulatory mechanism. Houseflies have a distinctive polymorphic sex determination system in which a dominant male determiner, the M-factor, can reside on any of the chromosomes. We identified a gene, (), as the M-factor. originated from a duplication of the spliceosomal factor gene (). Targeted disruption results in complete sex reversal to fertile females because of a shift from male to female expression of the downstream genes and The presence of on different chromosomes indicates that translocated to different genomic sites. Thus, an instructive signal in sex determination can arise by duplication and neofunctionalization of an essential splicing regulator.