Female birds deposit in the yolks of eggs substantial amounts of androgens, such as testosterone and androstenedione. These androgens have been shown to speed up nestling development, induce a fast development of ornaments and increase dominance in adults. Experiments in several species have reported that females invest greater amounts of androgens in the eggs fathered by attractive males, suggesting that yolk androgen is a costly investment for either the offspring or the mother. There is some evidence that nestling immunocompetence may be partially suppressed by high levels of yolk androgens, but it is not known whether this is also the case for females. We tested this hypothesis in the house martin by inducing an immune challenge through an injection of sheep red blood cells, a standard challenge of the humoral immune system. Experimental birds laid eggs with lower amounts of yolk androstenedione than controls, and there was a similar non-significant trend for testosterone. Furthermore, the probability of laying a replacement clutch was higher for birds that had laid a first clutch with relatively high levels of yolk testosterone. These results suggest that yolk androgen deposition is limited by immune costs in the female, and that only females in good condition may afford to invest high levels of androgen in eggs in this species.