In the fungal kingdom, the evolution of mating systems is highly dynamic, varying even among closely related species. Rearrangements in the mating-type (mat) locus, which contains the major regulators of sexual development, are expected to underlie the transitions between self-sterility (heterothallism) and self-fertility (homothallism). However, both the genetic mechanisms and the direction of evolutionary transitions in fungal mating systems are under debate. Here, we present new sequences of the mat locus of four homothallic and one heterothallic species of the model genus Neurospora (Ascomycota). By examining the patterns of synteny among these sequences and previously published data, we show that the locus is conserved among heterothallic species belonging to distinct phylogenetic clades, while different gene arrangements characterize the four homothallic species. These results allowed us to ascertain a heterothallic ancestor for the genus, confirming the prediction of the dead-end theory on unidirectional transitions toward selfing. We show that at least four shifts from heterothallism to homothallism have occurred in Neurospora, three of which involve the acquisition of sequences of both mating types into the same haploid genome. We present evidence for two genetic mechanisms allowing these shifts: translocation and unequal crossover. Finally, we identified two novel retrotransposons and suggest that these have played a major role in mating-system transitions, by facilitating multiple rearrangements of the mat locus.