The intramembrane vitamin K epoxide reductase (VKOR) supports blood coagulation in humans and is the target of the anticoagulant warfarin. VKOR and its homologues generate disulphide bonds in organisms ranging from bacteria to humans. Here, to better understand the mechanism of VKOR catalysis, we report two crystal structures of a bacterial VKOR captured in different reaction states. These structures reveal a short helix at the hydrophobic active site of VKOR that alters between wound and unwound conformations. Motions of this 'horizontal helix' promote electron transfer by regulating the positions of two cysteines in an adjacent loop. Winding of the helix separates these 'loop cysteines' to prevent backward electron flow. Despite these motions, hydrophobicity at the active site is maintained to facilitate VKOR catalysis. Biochemical experiments suggest that several warfarin-resistant mutations act by changing the conformation of the horizontal helix. Taken together, these studies provide a comprehensive understanding of VKOR function.