Functioning and processing of membrane proteins critically depend on the way their transmembrane segments are embedded in the membrane. Sphingolipids are structural components of membranes and can also act as intracellular second messengers. Not much is known of sphingolipids binding to transmembrane domains (TMDs) of proteins within the hydrophobic bilayer, and how this could affect protein function. Here we show a direct and highly specific interaction of exclusively one sphingomyelin species, SM 18, with the TMD of the COPI machinery protein p24 (ref. 2). Strikingly, the interaction depends on both the headgroup and the backbone of the sphingolipid, and on a signature sequence (VXXTLXXIY) within the TMD. Molecular dynamics simulations show a close interaction of SM 18 with the TMD. We suggest a role of SM 18 in regulating the equilibrium between an inactive monomeric and an active oligomeric state of the p24 protein, which in turn regulates COPI-dependent transport. Bioinformatic analyses predict that the signature sequence represents a conserved sphingolipid-binding cavity in a variety of mammalian membrane proteins. Thus, in addition to a function as second messengers, sphingolipids can act as cofactors to regulate the function of transmembrane proteins. Our discovery of an unprecedented specificity of interaction of a TMD with an individual sphingolipid species adds to our understanding of why biological membranes are assembled from such a large variety of different lipids.