HLA-B*40:02 is one of a few Major Histocompatibility Complex class I (MHC-I) molecules associated with ankylosing spondylitis (AS) independently of HLA-B*27. The endoplasmic reticulum aminopeptidase 2 (ERAP2), an enzyme that process MHC-I ligands and preferentially trims N-terminal basic residues, is also a risk factor for this disease. Like HLA-B*27 and other AS-associated MHC-I molecules, HLA-B*40:02 binds a relatively high percentage of peptides with ERAP2-susceptible residues. In this study the effects of ERAP2 depletion on the HLA-B*40:02 peptidome were analyzed. ERAP2 protein expression was knocked out by CRISPR in the transfectant cell line C1R-B*40:02 and the differences between the peptidomes from the wildtype and ERAP2-KO cells were determined by label-free quantitative comparisons. The qualitative changes dependent on ERAP2 affected about 5% of the peptidome, but quantitative changes in peptide amounts were much more substantial, reflecting a significant influence of this enzyme on the generation/destruction balance of HLA-B*40:02 ligands. As in HLA-B*27, a major effect was on the frequencies of N-terminal residues. In this position basic and small residues were increased in the absence of ERAP2 and aliphatic/aromatic residues were increased in the presence of the enzyme. Since most of the non-B*27 MHC-I molecules associated with AS risk also bind a relatively high percentage of peptides with N-terminal basic residues we hypothesize that the non-epistatic association of ERAP2 with AS might be related to the processing of peptides with these residues bound by AS-associated MHC-I molecules.