Sex determination in honeybees (Apis mellifera) is governed by heterozygosity at a single locus harbouring the complementary sex determiner (csd) gene, in contrast to the well-studied sex chromosome system of Drosophila melanogaster. Bees heterozygous at csd are females, whereas homozygotes and hemizygotes (haploid individuals) are males. Although at least 15 different csd alleles are known among natural bee populations, the mechanisms linking allelic interactions to switching of the sexual development programme are still obscure. Here we report a new component of the sex-determining pathway in honeybees, encoded 12 kilobases upstream of csd. The gene feminizer (fem) is the ancestrally conserved progenitor gene from which csd arose and encodes an SR-type protein, harbouring an Arg/Ser-rich domain. Fem shares the same arrangement of Arg/Ser- and proline-rich-domain with the Drosophila principal sex-determining gene transformer (tra), but lacks conserved motifs except for a 30-amino-acid motif that Fem shares only with Tra of another fly, Ceratitis capitata. Like tra, the fem transcript is alternatively spliced. The male-specific splice variant contains a premature stop codon and yields no functional product, whereas the female-specific splice variant encodes the functional protein. We show that RNA interference (RNAi)-induced knockdowns of the female-specific fem splice variant result in male bees, indicating that the fem product is required for entire female development. Furthermore, RNAi-induced knockdowns of female allelic csd transcripts result in the male-specific fem splice variant, suggesting that the fem gene implements the switch of developmental pathways controlled by heterozygosity at csd. Comparative analysis of fem and csd coding sequences from five bee species indicates a recent origin of csd in the honeybee lineage from the fem progenitor and provides evidence for positive selection at csd accompanied by purifying selection at fem. The fem locus in bees uncovers gene duplication and positive selection as evolutionary mechanisms underlying the origin of a novel sex determination pathway.