The crystal structure of abacavir-peptide-HLA-B*57:01 reveals abacavir binding noncovalently within the F pocket of the peptide-binding cleft of HLA-B*57:01, altering its peptide specificity. Polymorphic residues (Asp114 and Ser116 in magenta) distinguish HLA-B*57:01 from alleles not associated with abacavir hypersensitivity, such as HLA-B*57:03. These residues form hydrogen bonds with abacavir that explain the HLA-B*57:01-specific binding effects. Abacavir occupies a portion of the antigen-binding cleft, which alters the repertoire of bound peptides to HLA-B*57:01 to favor presentation of peptides with a small C-terminal residue, such as valine and isoleucine, rather than the normally preferred large hydrophobic residues tryptophan and phenylalanine. This results in the presentation of antigens to which the host has not been previously tolerized. The recognition of the abacavir-altered peptide-HLA-B*57:01 complex triggers the hypersensitivity response.