The endoplasmic reticulum (ER) protein tapasin is essential for the loading of high-affinity peptides onto MHC class I molecules. It mediates peptide editing, i.e. the binding of peptides of successively higher affinity until class I molecules pass ER quality control and exit to the cell surface. The molecular mechanism of action of tapasin is unknown. We describe here the reconstitution of tapasin-mediated peptide editing on class I molecules in the lumen of microsomal membranes. We find that in a competitive situation between high- and low-affinity peptides, tapasin mediates the binding of the high-affinity peptide to class I by accelerating the dissociation of the peptide from an unstable intermediate of the binding reaction.