Several insect species show an increase in cuticular melanism in response to high densities. In some species, there is evidence that this melanism is correlated with an up-regulation of certain immune system components, particularly phenoloxidase (PO) activity, and with the down-regulation of lysozyme activity, suggesting a trade-off between the two traits. As melanism has a genetic component, we selected both melanic and nonmelanic lines of the phase-polyphenic lepidopteran, Spodoptera littoralis, in order to test for a causative genetic link between melanism, PO activity and lysozyme activity, and to establish if there are any life-history costs associated with the melanic response. We found that, in fact, melanic lines had lower PO activity and higher lysozyme activity than nonmelanic lines, confirming a genetic trade-off between the two immune responses, but also indicating a genetic trade-off between melanism and PO activity. In addition, we found that lines with high PO activity had slower development rates suggesting that investment in PO, rather than in melanism, is costly.