Levels of circulating glucocorticoids oscillate in a circadian manner, but the importance of these rhythmic fluctuations in hormone levels is unknown. The authors here show that the amplitude of glucocorticoid oscillations is increased in female mice with subcapsular cell hyperplasia (SCH) of the adrenal gland. These mice exhibit reduced anxiety-related behaviour, an effect that is dependent on the increased glucocorticoid oscillations. They further show that SCH cells secrete intermediate opioid peptides that bind to the chemokine receptor CXCR7 (also known as ACKR3) in the adrenal glands to boost glucocorticoid oscillations. Thus, circadian glucocorticoid oscillations are involved in the regulation of emotional behaviour.