Central to the conceptual basis of ecological immunity is the notion that immune effector systems are costly to produce, run, and/or maintain. Using the mealworm beetle, Tenebrio molitor, as a model we investigated two aspects of the costs of innate immunity. We conducted an experiment designed to identify the cost of an induced immune response, and the cost of constitutive investment in immunity, as well as potential interactions. The immune traits under consideration were the encapsulation response and prophylactic cuticular melanization, which are mechanistically linked by the melanin‐producing phenoloxidase cascade. If immunity is costly, we predicted reduced longevity and/or fecundity as a consequence of investment in either immune trait. We found a measurable longevity cost associated with producing an inducible immune response (encapsulation). In contrast to other studies, this cost was expressed under ad libitum feeding conditions. We found no measurable costs for constitutive investment in immunity (prophylactic investment in cuticular colour).