Melatonin regulates diurnal changes in locomotor activity in vertebrates, but the molecular mechanism for this neurohormonal regulation of behavior is poorly understood. Here we show that 7␣-hydroxypregnenolone, a previously undescribed avian neurosteroid, mediates melatonin action on diurnal locomotor rhythms in quail. In this study, we first identified 7␣-hydroxypregnenolone and its stereoisomer 7-hydroxypregnenolone in quail brain. These neurosteroids have not been described previously in avian brain. We then demonstrated that 7␣-hydroxypregnenolone acutely increased quail locomotor activity. To analyze the production of 7␣-hydroxypregnenolone, cytochrome P450 7␣ , a steroidogenic enzyme of this neurosteroid, was also identified. Subsequently, we demonstrated diurnal changes in 7␣-hydroxypregnenolone synthesis in quail. 7␣-Hydroxypregnenolone synthesis and locomotor activity in males were much higher than in females. This is the first demonstration in any vertebrate of a clear sex difference in neurosteroid synthesis. This sex difference in 7␣-hydroxypregnenolone synthesis corresponded to the sex difference in locomotion. We show that only males exhibited marked diurnal changes in 7␣-hydroxypregnenolone synthesis, and these changes occurred in parallel with changes in locomotor activity. Finally, we identified melatonin as a key component of the mechanism regulating 7␣-hydroxypregnenolone synthesis. Increased synthesis of 7␣-hydroxypregnenolone occurred in males in vivo after melatonin removal via pinealectomy and orbital enucleation (Px plus Ex). Conversely, decreased synthesis of this neurosteroid occurred after melatonin administration to Px plus Ex males. This study demonstrates that melatonin regulates synthesis of 7␣-hydroxypregnenolone, a key factor for induction of locomotor activity, thus inducing diurnal locomotor changes in male birds. This is a previously undescribed role for melatonin.