Membrane proteins depend on complex translocation machineries for insertion into target membranes. Although it has long been known that an abundance of nonpolar residues in transmembrane helices is the principal criterion for membrane insertion, the specific sequence-coding for transmembrane helices has not been identified. By challenging the endoplasmic reticulum Sec61 translocon with an extensive set of designed polypeptide segments, we have determined the basic features of this code, including a 'biological' hydrophobicity scale. We find that membrane insertion depends strongly on the position of polar residues within transmembrane segments, adding a new dimension to the problem of predicting transmembrane helices from amino acid sequences. Our results indicate that direct protein-lipid interactions are critical during translocon-mediated membrane insertion.