The evolution of sexual display traits or preferences for them in response to divergent natural selection will alter sexual selection within populations, yet the role of sexual selection in ecological speciation has received little empirical attention. We evolved 12 populations of Drosophila serrata in a two-way factorial design to investigate the roles of natural and sexual selection in the evolution of female mate preferences for male cuticular hydrocarbons (CHCs). Mate preferences weakened in populations evolving under natural selection alone, implying a cost in the absence of their expression. Comparison of the vectors of linear sexual selection revealed that the populations diverged in the combination of male CHCs that females found most attractive, although this was not significant using a mixed modelling approach. Changes in preference direction tended to evolve when natural and sexual selection were unconstrained, suggesting that both processes may be the key to initial stages of ecological speciation. Determining the generality of this result will require data from various species across a range of novel environments.