Jami` at-Tirmidhi, Book 47, Hadith 202 (Tirmidhi 3234)

Narrated Ibn 'Abbas:

that Ubayy bin Ka'b narrated that the Prophet (ﷺ) said: "The boy that Al-Khidr killed was destined to be a disbeliever the day he was created.'"