Evidence on the long-term risk of HIV infection in individuals taking HIV post-exposure prophylaxis remains limited. In this retrospective data linkage study, we evaluate the occurrence of HIV infection in 975 individuals who sought post-exposure prophylaxis in a tertiary hospital between 2007 and 2013. Using privacy preserving probabilistic linkage, we link these 975 records with two observational databases providing data on HIV events (Zurich Primary HIV Infection study and the Swiss HIV Cohort Study). This enables us to identify 22 HIV infections and to obtain long-term follow-up data, which reveal a median of 4.1 years between consultation for post-exposure prophylaxis and HIV diagnosis. Even though men who have sex with men constitute only 35.8% of those seeking post-exposure prophylaxis, all 22 events occur in this subgroup. These findings should strongly encourage early consideration of pre-exposure prophylaxis in men who have sex with men after a first episode of post-exposure prophylaxis.