First principles simulation of x-ray photoemission spectroscopy (XPS) is an important tool in the challenging interpretation and assignment of XPS data of metal-organic interfaces. We investigate the origin of the disagreement between XPS simulation and experiment for the azulene molecule adsorbed on Ag(111). We systematically eliminate possible causes for this discrepancy, including errors in the structural model and finite size effects in periodic boundary conditions. By analysis of the electronic structure in the ground-state and the core-hole excited-state, we are able to trace the error back to artificial charge transfer between adsorbed molecule and metal surface. This is caused by the self-interaction error of common exchange-correlation functionals. This error is not remedied by standard hybrid or range-separated hybrid functionals. We employ an ad hoc self-interaction error correction based on molecular orbital projection, that exposes this issue and is able to recover the correct experimental behaviour. The charge transfer artefact also negatively affects the prediction of X-ray absorption spectra for this system. Both the simulated photoemisson and x-ray absorption spectra show a better agreement with experimental data, once the ad hoc correction is employed. Similar core-hole-induced charge artefacts may affect core-level simulations at metal-organic interfaces more generally.