Cell-free gene expression (CFE) systems are powerful tools for transcribing and translating genes outside of a living cell. Synthesis of membrane proteins is of particular interest, but their yield in CFE is substantially lower than that for soluble proteins. In this paper, we study the CFE of membrane proteins and develop a quantitative kinetic model. We identify that ribosome stalling during the translation of membrane proteins is a strong predictor of membrane protein synthesis due to aggregation between the ribosome nascent chains. Synthesis can be improved by the addition of lipid membranes, which incorporate protein nascent chains and, therefore, kinetically compete with aggregation. We show that the balance between peptide-membrane association and peptide aggregation rates determines the yield of the synthesized membrane protein. We define a membrane protein expression score that can be used to rationalize the engineering of lipid composition and the N-terminal domain of a native and computationally designed membrane proteins produced through CFE.