Endogenous glucocorticoids are crucial to various physiological processes, including metabolism, development and inflammation. Since 1948, synthetic glucocorticoids have been used to treat various immune-related disorders. The mechanisms that underlie the immunosuppressive properties of these hormones have been intensely scrutinized, and it is widely appreciated that glucocorticoids have pleiotropic effects on the immune system. However, a clear picture of the cellular and molecular basis of glucocorticoid action has remained elusive. In this Review, we distil several decades of intense (and often conflicting) research that defines the interface between the endocrine stress response and the immune system.