Within any hierarchical society, an individual's social rank can have profound effects on its health and reproductive success1,2, and rank-related variation in these traits is often mediated by variation in endocrine function2. Maternal effects mediated by prenatal hormone exposure are potentially important for non-genetic inheritance of phenotypic traits related to social rank3, and thus for shaping individual variation in behaviour and social structure. Here we show that androgen concentrations in wild female spotted hyaenas (Crocuta crocuta) are higher during late gestation in dominant females than in subordinate females. Furthermore, both male and female cubs born to mothers with high concentrations of androgens in late pregnancy exhibit higher rates of aggression and mounting behaviour than cubs born to mothers with lower androgen concentrations. Both behaviours are strongly affected in other mammals by organizational effects of androgens4, and both have important effects on fitness in hyaenas. Therefore, our results suggest that rank-related maternal effects of prenatal androgen exposure can adaptively influence offspring phenotype in mammals, as has previously been shown to occur in birds. They also suggest an organizational mechanism for the development of female dominance and aggressiveness in spotted hyaenas, traits that may offset the costs of extreme virilization.