Sex chromosomes are generally believed to have descended from a pair of homologous autosomes. Suppression of recombination between the ancestral sex chromosomes led to the genetic degeneration of the Y chromosome. In response, the X chromosome may become dosage-compensated. Most proposed mechanisms for the degeneration of Y chromosomes involve the rapid fixation of deleterious mutations on the Y. Alternatively, Y-chromosome degeneration might be a response to a slower rate of adaptive evolution, caused by its lack of recombination. Here we report patterns of DNA polymorphism and divergence at four genes located on the neo-sex chromosomes of Drosophila miranda. We show that a higher rate of protein sequence evolution of the neo-X-linked copy of Cyclin B relative to the neo-Y copy is driven by positive selection, which is consistent with the adaptive hypothesis for the evolution of the Y chromosome. In contrast, the neo-Y-linked copies of even-skipped and roundabout show an elevated rate of protein evolution relative to their neo-X homologues, probably reflecting the reduced effectiveness of selection against deleterious mutations in a non-recombining genome. Our results provide evidence for the importance of sexual recombination for increasing and maintaining the level of adaptation of a population.