Abstract Global warming has substantially changed the environment, but the mechanisms to cope with these changes in animals, including the role of maternal effects, are poorly understood. Maternal effects via hormones deposited in eggs, have important environment-dependent effects on offspring development and fitness: thus females are expected to adjust these hormones to the environment, such as the ambient temperature. Longer-term temperature variation could function as a cue, predicting chick rearing conditions to which yolk hormone levels are adjusted, while short-term temperature variation during egg formation may causally affect hormone transfer to eggs. We studied the effects of ambient temperature on yolk androgens (testosterone and androstenedione) and thyroid hormones (thyroxine and triiodothyronine) in great tits (Parus major) using data from unmanipulated clutches from a wild population and from aviary birds (ad libitum food) exposed to different experimental temperature treatments during five years. Both in the wild and in captivity, longer-term pre-laying ambient temperature was not associated with clutch mean yolk hormone levels, while the way androstenedione and thyroxine levels varied across the laying sequence did associate with pre-laying temperature in the wild. Yolk testosterone levels were positively correlated with short-term temperature (during yolk formation) changes within clutches in both wild and captivity. We also report, for the first time in a wild bird, that yolk thyroxine levels correlated with a key environmental factor: thyroxine levels were negatively correlated with ambient temperature during egg formation. Thus, yolk hormone levels, especially testosterone, seem to be causally affected by ambient temperature. These short-term effects might reflect physiological changes in females with changes in ambient temperature. The adaptive value of the variation with ambient temperatures pre-laying or during egg formation should be studied with hormone manipulations in different thermal environments.