Mediator is a conserved coactivator that enables regulated transcription initiation at eukaryotic genes1–3. Mediator is recruited by transcriptional activators and binds the pre-initiation complex (PIC) to stimulate RNA polymerase II (Pol II) phosphorylation and promoter escape1–6. Here we prepare a recombinant human Mediator, reconstitute a 50-subunit Mediator-PIC complex, and determine the structure of the complex by cryo-EM. Mediator uses its head module to contact the Pol II stalk and the general transcription factors TFIIB and TFIIE, resembling the Mediator-PIC interactions in the corresponding yeast complex7–9. The metazoan subunits MED27-MED30 associate with exposed regions in MED14 and MED17 to form the proximal part of the Mediator tail module that binds activators. Mediator positions the flexibly linked CDK-activating kinase (CAK) of the general transcription factor TFIIH near the linker to the C-terminal repeat domain (CTD) of Pol II. The Mediator shoulder domain holds the CAK subunit CDK7, whereas the hook domain contacts a CDK7 element that flanks the kinase active site. The shoulder and hook reside in the Mediator head and middle modules, respectively, which can move relative to each other and may induce an active conformation of the CDK7 kinase to allosterically stimulate CTD phosphorylation.