The maturation of Ras GTPases, and ~200 other cellular CaaX proteins, involves three enzymatic steps: addition of a farnesyl or geranylgeranyl prenyl lipid to the cysteine (C) in the C-terminal CaaX motif, proteolytic cleavage of the aaX residues, and methylation of the exposed prenylcysteine residue at its terminal carboxylate1. This final step is catalyzed by isoprenylcysteine carboxyl methyltransferase (ICMT), a eukaryotic-specific integral membrane enzyme of the endoplasmic reticulum (ER)2. ICMT is the only cellular enzyme known to methylate prenylcysteine substrates; methylation is important for their biological functions, including the membrane localisations and subsequent activities of Ras1, prelamin A3, and Rab4. ICMT inhibition has potential for combating progeria3 and cancer5–8. Here we present an X-ray structure of ICMT, at 2.3 Å resolution, in complex with its cofactor, an ordered lipid molecule and a monobody inhibitor. The active site spans cytosolic and membrane-exposed regions, indicating distinct entry routes for its cytosolic methyl donor, S-adenosyl-L-methionine (AdoMet), and for prenylcysteine substrates, which are associated with the ER membrane. The structure suggests how ICMT overcomes the topographical challenge and unfavourable energetics of bringing two reactants that have different cellular localisations together in a membrane environment – a relatively uncharacterized, but defining feature of many integral membrane enzymes.