Aminopeptidases that generate antigenic peptides influence immunodominance and adaptive cytotoxic immune responses. The mechanisms that allow these enzymes to efficiently process a vast number of different long peptide substrates are poorly understood. In this work, we report the structure of insulin-regulated aminopeptidase, an enzyme that prepares antigenic epitopes for cross-presentation in dendritic cells, in complex with an antigenic peptide precursor analog. Insulin-regulated aminopeptidase is found in a semiclosed conformation with an extended internal cavity with limited access to the solvent. The N-terminal moiety of the peptide is located at the active site, positioned optimally for catalysis, whereas the C-terminal moiety of the peptide is stabilized along the extended internal cavity lodged between domains II and IV. Hydrophobic interactions and shape complementarity enhance peptide affinity beyond the catalytic site and support a limited selectivity model for antigenic peptide selection that may underlie the generation of complex immunopeptidomes.