Erm , since i cant find anything on Type-Moon Wiki i will put this
Wikipedia wrote:Toward the end of the war, Kirei clashed against Kiritsugu Emiya, but he was easily killed. In his last moments, the Holy Grail appeared to Kirei; filled with hatred and envy for Kiritsugu, he reached out and touched the cursed artifact. Kirei prayed for an end to humanity; his wish was granted in the form of fire. Amidst the roaring flames, Kiritsugu's Saber obliterated the Holy Grail, allowing its tainted water to soak Kirei's lifeless body, resurrecting him with an artificial, black heart.
He made the wish after he got shot and while he is half dead , what you said of him wishing for everyone to disappear is true but its only wished after he is shot.....
"You sit proudly in this cave , like a Queen of Egypt.
In my service to you , I shall never know rest.
To prove my devotion , I have stolen this ostentatious offering.
But I'll show you things your dark blue eye haven't seen , smiles like a lake in the sun , blossoming like a lotus."