Summary Whether the changes brought about by sexual selection are, on the whole, congruent or incongruent with the changes favored by natural selection is a fundamentally important question in evolutionary biology. Although a number of theoretical models have assumed that sexual selection reinforces natural selection [1, 2], others assume these forces are in opposition [3–5]. Empirical results have been mixed (see reviews in [1, 6–8]) and the reasons for the differences among studies are unclear. Variable outcomes are expected if populations differ in their evolutionary histories and therefore harbor different amounts and types of segregating genetic variation. Here, we constructed populations of Drosophila melanogaster that differed in this regard to directly test this hypothesis. In well-adapted populations, sexually successful males sired unfit daughters, indicating sexual and natural selection are in conflict. However, in populations containing an influx of maladaptive alleles, attractive males sired offspring of high fitness, suggesting that sexual selection reinforces natural selection. Taken together, these results emphasize the importance of evolutionary history on the outcome of sexual selection. Consequently, studies based on laboratory populations, cultured for prolonged periods under homogeneous conditions, may provide a skewed perspective on the relationship between sexual and natural selection.