Long-term effects of unfavourable conditions during development can be expected to depend on the quality of the environment experienced by the same individuals during adulthood. Yet, in the majority of studies, long-term effects of early developmental conditions have been assessed under favourable adult conditions only. The immune system might be particularly vulnerable to early environmental conditions as its development, maintenance and use are thought to be energetically costly. Here, we studied the interactive effects of favourable and unfavourable conditions during nestling and adult stages on innate immunity (lysis and agglutination scores) of captive male and female zebra finches (Taeniopygia guttata). Nestling environmental conditions were manipulated by a brood size experiment, while a foraging cost treatment was imposed on the same individuals during adulthood. This combined treatment showed that innate immunity of adult zebra finches is affected by their early developmental conditions and varies between both sexes. Lysis scores, but not agglutination scores, were higher in individuals raised in small broods and in males. However, these effects were only present in birds that experienced low foraging costs. This study shows that the quality of the adult environment may shape the long-term consequences of early developmental conditions on innate immunity, as long-term effects of nestling environment were only evident under favourable adult conditions