The lipid bilayer that constitutes cell membranes imposes environmental constraints on the structure, folding and function of integral membrane proteins. The cell membrane is an enormously heterogeneous and dynamic system in its chemical composition and associated physical forces. The lipid compositions of cell membranes not only vary over the tree of life but also differ by subcellular compartments within the same organism. Even in the same subcellular compartment, the membrane composition shows strong temporal and spatial dependence on the environmental or biological cues. Hence, one may expect that the membrane protein conformations and their equilibria strongly depend on the physicochemical variables of the lipid bilayer. Contrary to this expectation, the structures of homologous membrane proteins belonging to the same family but from evolutionary distant organisms exhibit a striking similarity. Furthermore, the atomic structures of the same protein in different lipid environments are also very similar. This suggests that certain stable folds optimized for a specific function have been selected by evolution. On the other hand, there is growing evidence that, despite the overall stability of the protein folds, functions of certain membrane proteins require a particular lipid composition in the bulk bilayer or binding of specific lipid species. Here I discuss the specific and nonspecific modulation of folding, misfolding and function of membrane proteins by lipids and introduce several diseases that are caused by misfolding of membrane proteins.