Maternal effects can have an adaptive value if they improve the performance of offspring. As such, the transfer of maternal testosterone (T) to the eggs has been suggested as a mechanism for adaptive maternal control of offspring phenotype in birds, although recent studies have shown negative effects of testosterone on hatching rate and chick survival. Here, we experimentally investigated whether socially stressful conditions experienced by female house sparrows during egg laying affected their circulating levels of androgens and the amount transferred to the eggs. Social stress was simulated by the intrusion of a foreign male placed near the nest box during the egg-laying sequence. We found that (1) both female and yolk testosterone titres were positively related to breeding density; (2) yolk testosterone was negatively correlated with maternal testosterone; (3) yolk testosterone was positively correlated with the behavioural response of females towards the intruder and (4) the interaction between social intrusion and breeding density affected the amount of testosterone transferred to the eggs. Altogether, our results suggest that females may be able to modulate the amount of testosterone they allocate to their eggs according to the social environment they experience during egg laying.