3458 years after Habuth (descent of Adam a.s from Heaven)
Khizr a.s was the descendant of Sam bin Nuh a.s he was the (maternal) cousin of Zulqarnain. His name was Balya, Kuniyat Abu Abbas(Kuniyat an Arabic name, a type of epithet, the person is called by the name of the first-born son or daughter along with name abu ‘father’ Like Abu musa that is father of Musa) and His title was Khizr.
The reason for his name Khizr was that where ever he used to sit or stand, that place would to grow green plants. This name is derived from the colour green خضرة. All the historians agree that he drank the water of life and he will live an immortal life till the Judgement day, he will be alive up till the blowing of the resurrection day’s trumpet.
The father of Khizr a.s was a king and he was the kings only son but Khizr a.s was always whole heartedly engaged in the worship of almighty God in a closed room. His king father was always fearful that his generation will come to an end.
He brought a bride for Khizr and celebrated his marriage but he never consummated his marriage. His father was always selecting wives and giving in marriage for his son but when they were checked through the midwives it was found that he never expressed his love to any of them.
And those brides were bounded to swear not to reveal the reality to anybody. At last the father got infuriated and imprisoned him. Khizr a.s fled away from the kingdom of his father and took shelter to his cousin Zulqarnain’s empire, who was a king and he granted him high post in his office.
Zulqarnain was very fond of Khizr a.s and he was very much his favourite in the army.
He became the chief of the caravan of Zulqarnain while they started the journey to search the WATER OF LIFE آب حیات but Zulqarnain did not recognized that water where as Khizr a.s in the darkness (Zulamaat) of life found that water of life and drank it and he will be alive till the day of judgement.
In the authentic narrations it is stated that Khizr a.s came to receive the funeral of Hazrat Ali a.s and expressed his condolences to Hasnain a.s (Imam Hasan a.s and Imam Husain a.s) and guided them towards the grave which prophet Nuh a.s had made for the burial of Hazrat Ali a.s. Hazrat Khizr mostly lodges in Mosque of Sasa’a and Sahla Mosque and those places will be the dwelling of hazrat Khizr a.s forever.
Sayyid bin Tavus narrates: Every year in the occasion of Hajj Hazrat Khizr a.s and prophet Ilyas a.s meet each other and the next year again they join and accompany to perform Hajj.
source : http://www.imamreza.net