Improved survival is likely linked to the ability to generate stable memories of significant experiences. Considerable evidence in humans and mammalian model animals shows that steroid hormones, which are released in response to emotionally arousing experiences, have an important role in the consolidation of memories of such events. In insects, ecdysone is the major steroid hormone, and it is well characterized with respect to its essential role in coordinating developmental transitions such as larval molting and metamorphosis. However, the functions of ecdysone in adult physiology remain largely elusive. Here, we show that 20-hydroxyecdysone (20E), the active metabolite of ecdysone that is induced by environmental stimuli in adult Drosophila, has an important role in the formation of long-term memory (LTM). In male flies, the levels of 20E were found to be significantly increased after courtship conditioning, and exogenous administration of 20E either enhanced or suppressed courtship LTM, depending on the timing of its administration. We also found that mutants in which ecdysone signaling is reduced were defective in LTM, and that an elevation of 20E levels was associated with activation of the cAMP response element binding protein (CREB), an essential regulator of LTM formation. Our results demonstrate that the molting steroid hormone ecdysone in adult Drosophila is critical to the evolutionarily conserved strategy that is used for the formation of stable memories. We propose that ecdysone is able to consolidate memories possibly by recapturing molecular and cellular processes that are used for normal neural development.courtship conditioning ͉ CREB ͉ ecdysone receptor ͉ steroid hormone ͉ 20-hydroxyecdysone