Studies of the relationship between sexual traits and immune function have been at the forefront of sexual selection during the last decade. Whereas evidence is accumulating that there is a trade-off between sexual ornamentation and immunocompetence, the reasons for this trade-off are still unknown. Importantly, most studies have addressed this issue only at the adult stage, when sexual ornamentation and immune function may be fully developed. We show here that juvenile cell-mediated immune response is negatively correlated with subsequent size of an adult sexual ornament in the Chinese quail, Coturnix chinensis. This suggests that the cost of development of a functional immune system is traded off against secondary sexual traits, and that costs of high immunocompetence in juveniles may not be manifested until sexual maturity. Ontogenetic studies of the development of the immune function and associated costs and trade-offs are likely to provide a more complete picture of the links between sexual selection and immunobiology.