Vertebrates have an immature immune system soon after birth, and parasites can therefore be particularly virulent to young hosts. Transfer of immune factors via the egg can give rise to early maternal effects with important consequences for offspring fitness, as maternally derived immunity confers anti-parasite protection. Mothers are expected to allocate immunity differentially to the eggs according to the reproductive value of their offspring as influenced by the quality of their father. In this study, we analysed transmission to the yolk of antibodies specific to an antigen (Newcastle disease virus vaccine, NDV) by vaccinated female barn swallows (Hirundo rustica) mated to males whose secondary sexual characteristics had been manipulated. Concentration of anti–NDV antibodies in the yolk positively covaried with that in maternal plasma. Anti–NDV antibodies were more concentrated in the first but not the fourth eggs laid by females mated with tail–elongated males compared with those mated with tail–shortened and control males. This experiment shows that allocation of maternal immune factors to the eggs is affected by quality of the male, as signalled by its secondary sexual characteristic. Thus, early maternal effects are influenced by sexual attractiveness of male mates and are mediated by immunity.