Sahih Muslim Book 001, Hadith Number 0037.
Chapter : He who accepts Islam at the death-bed, before the actual agony of death, is a Muslim. It is forbidden to supplicate blessings for the polytheists. He who dies as a polytheist is one among the denizens of Hell and no means would be effective enough to take him out of that.
It is narrated on the authority of Abu Huraira that the Messenger of Allah said to his uncle at the time of his death: Make a profession of it that there is no god but Allah and I will bear testimony (of your being a Muslim) on the Day of judgment. But he (Abu Talib) refused to do so. Then Allah revealed this verse:
"Verily thou canst not guide to the right path whom thou lovest. And it is Allah Who guideth whom He will and He knoweth best who are the guided" (xxviii. 56).