We simulated a meta-population with random dispersal among demes but local mating within demes to investigate conditions under which a dominant female-determining gene W, with no individual selection advantage, can invade and become fixed in females, changing the population from male to female heterogamety. Starting with one mutant W in a single deme, the interaction of sex ratio selection and random genetic drift causes W to be fixed among females more often than a comparable neutral mutation with no influence on sex determination, even when YY males have slightly reduced viability. Meta-population structure and interdeme selection can also favour the fixation of W. The reverse transition from female to male heterogamety can also occur with higher probability than for a comparable neutral mutation. These results help to explain the involvement of sex-determining genes in the evolution of sex chromosomes and in sexual selection and speciation