In eukaryotic protein N-glycosylation, a series of glycosyltransferases catalyse the biosynthesis of a dolichylpyrophosphate-linked oligosaccharide before its transfer onto acceptor proteins1. The final seven steps occur in the lumen of the endoplasmic reticulum (ER) and require dolichylphosphate-activated mannose and glucose as donor substrates2. The responsible enzymes-ALG3, ALG9, ALG12, ALG6, ALG8 and ALG10-are glycosyltransferases of the C-superfamily (GT-Cs), which are loosely defined as containing membrane-spanning helices and processing an isoprenoid-linked carbohydrate donor substrate3,4. Here we present the cryo-electron microscopy structure of yeast ALG6 at 3.0 Å resolution, which reveals a previously undescribed transmembrane protein fold. Comparison with reported GT-C structures suggests that GT-C enzymes contain a modular architecture with a conserved module and a variable module, each with distinct functional roles. We used synthetic analogues of dolichylphosphate-linked and dolichylpyrophosphate-linked sugars and enzymatic glycan extension to generate donor and acceptor substrates using purified enzymes of the ALG pathway to recapitulate the activity of ALG6 in vitro. A second cryo-electron microscopy structure of ALG6 bound to an analogue of dolichylphosphate-glucose at 3.9 Å resolution revealed the active site of the enzyme. Functional analysis of ALG6 variants identified a catalytic aspartate residue that probably acts as a general base. This residue is conserved in the GT-C superfamily. Our results define the architecture of ER-luminal GT-C enzymes and provide a structural basis for understanding their catalytic mechanisms.