The evolution of immune function depends not only on variation in genes contributing directly to the immune response, but also on genetic variation in other traits indirectly affecting immunocompetence. In particular, sexual selection is predicted to trade-off with immunocompetence because the extra investment of resources needed to increase sexual competitiveness reduces investment in immune function. Additional possible immunological consequences of intensifying sexual selection include an exaggeration of immunological sexual dimorphism, and the reduction of condition-dependent immunological costs due to selection of 'good genes' (the immunocompetence handicap hypothesis, ICHH). We tested for these evolutionary possibilities by increasing sexual selection in laboratory populations of Drosophila melanogaster for 58 generations by reestablishing a male-biased sex ratio at the start of each generation. Sexually selected flies were larger, took longer to develop, and the males were more sexually competitive than males from control (equal sex ratio) lines. We found support for the trade-off hypothesis: sexually selected males were found to have reduced immune function compared to control males. However, we found no evidence that sexual selection promoted immunological sexual dimorphism because females showed a similar reduction in immune function. We found no evidence of evolutionary changes in the condition-dependent expression of immunocompetence contrary to the expectations of the ICHH. Lastly, we compared males from the unselected base population that were either successful (IS) or unsuccessful (IU) in a competitive mating experiment. IS males showed reduced immune function relative to IU males, suggesting that patterns of phenotypic correlation largely mirror patterns of genetic correlation revealed by the selection experiment. Our results suggest increased disease susceptibility could be an important cost limiting increases in sexual competitiveness in populations experiencing intense sexual selection. Such costs may be particularly important given the high intersex correlation, because this represents an apparent genetic conflict, preventing males from reaching their sexually selected optimum.