Caenorhabditis elegans can reproduce exclusively by self-fertilization. Yet, males can be maintained in laboratory populations, a phenomenon that continues to puzzle biologists. In this study we evaluated the role of males in facilitating adaptation to novel environments. For this, we contrasted the evolution of a fitness component exclusive to outcrossing in experimental populations of different mating systems. We introgressed a modifier of outcrossing into a hybrid population derived from several wild isolates to transform the wild-type androdioecious mating system into a dioecious mating system. By genotyping 375 single-nucleotide polymorphisms we show that the two populations had similar standing genetic diversity available for adaptation, despite the occurrence of selection during their derivation. We then performed replicated experimental evolution under the two mating systems from starting conditions of either high or low levels of diversity, under defined environmental conditions of discrete non-overlapping generations, constant density at high population sizes (N = 10(4)), no obvious spatial structure and abundant food resources. During 100 generations measurements of sex ratios and male competitive performance showed: 1) adaptation to the novel environment; 2) directional selection on male frequency under androdioecy; 3) optimal outcrossing rates of 0.5 under androdioecy; 4) the existence of initial inbreeding depression; and finally 5) that the strength of directional selection on male competitive performance does not depend on male frequencies. Taken together, these results suggest that androdioecious males are maintained at intermediate frequencies because outcrossing is adaptive.