Sunan an-Nasa'i 190
It was narrated that Abbu Ishaq said:
"I heard Najiyah bin Ka'b narrating from 'Ali that he came to the Prophet (ﷺ) and said: 'Abu Talib has died.' He said: 'Go and bury him.' He said: 'He died as an idolator.' He said: 'Go and bury him.' ('Ali said:) 'When I had buried him I went back to him and he said to me: 'Perform Ghusl.'"
أَخْبَرَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، عَنْ مُحَمَّدٍ، قَالَ حَدَّثَنِي شُعْبَةُ، عَنْ أَبِي إِسْحَاقَ، قَالَ سَمِعْتُ نَاجِيَةَ بْنَ كَعْبٍ، عَنْ عَلِيٍّ، رضى الله عنه أَنَّهُ أَتَى النَّبِيَّ صلى الله عليه وسلم فَقَالَ إِنَّ أَبَا طَالِبٍ مَاتَ ‏.‏ فَقَالَ ‏"‏ اذْهَبْ فَوَارِهِ ‏"‏ ‏.‏ قَالَ إِنَّهُ مَاتَ مُشْرِكًا ‏.‏ قَالَ ‏"‏ اذْهَبْ فَوَارِهِ ‏"‏ ‏.‏ فَلَمَّا وَارَيْتُهُ رَجَعْتُ إِلَيْهِ فَقَالَ لِي ‏"‏ اغْتَسِلْ ‏"‏ ‏.‏