The potent lipid mediator sphingosine-1-phosphate (S1P) is produced inside cells by two closely related kinases, sphingosine kinase 1 (SPHK1) and SPHK2, and has emerged as a crucial regulator of immunity. Many of the actions of S1P in innate and adaptive immunity are mediated by its binding to five G protein-coupled receptors, designated S1PR1-5, but recent findings have also identified important roles for S1P as a second messenger during inflammation. In this Review, we discuss recent advances in our understanding of the roles of S1P receptors and describe the newly identified intracellular targets of S1P that are crucial for immune responses. Finally, we discuss the therapeutic potential of new drugs that target S1P signalling and functions.