Sex in honeybees, Apis mellifera, is genetically determined by heterozygous versus homo/hemizygous genotypes involving numerous alleles at the single complementary sex determination locus. The molecular mechanism of sex determination is however unknown because there are more than 4950 known possible allele combinations, but only two sexes in the species. We show how protein variants expressed from complementary sex determiner (csd) gene determine sex. In females, the amino acid differences between Csd variants at the potential-specifying domain (PSD) direct the selection of a conserved coiled-coil domain for binding and protein complexation. This recognition mechanism activates Csd proteins and, thus, the female pathway. In males, the absence of polymorphisms establishes other binding elements at PSD for binding and complexation of identical Csd proteins. This second recognition mechanism inactivates Csd proteins and commits male development via default pathway. Our results demonstrate that the recognition of different versus identical variants of a single protein is a mechanism to determine sex.