Note: ‘Allaamah Suhaili (rahimahullah) mentions, “Abu Taalib, from head to foot, was fully immersed in assisting and protecting Rasulullah (sallallahu ‘alaihi wasallam). It was only his feet that remained on the creed of ‘Abdul Muttalib, instead of coming onto Islam. It is for this reason that his feet were subjected to punishment in Jahannum.
رَبَّنَاۤ اَفۡرِغۡ عَلَیۡنَا صَبۡرًا وَّ ثَبِّتۡ اَقۡدَامَنَا وَ انۡصُرۡنَا عَلَی الۡقَوۡمِ الۡکٰفِرِیۡنَ
O our Rabb! Pour upon us patience, make our feet firm and steadfast, and assist us against the disbelieving nation. (Surah Baqarah v. 250)
Hazrat ‘Ali (radhiyallahu ‘anhu) reports, “When Abu Taalib passed away, I came to Rasulullah (sallallahu ‘alaihi wasallam) and said, ‘O Rasul of Allah (sallallahu ‘alaihi wasallam)! Your uncle, who was on misguidance, has passed away.’ Rasulullah (sallallahu ‘alaihi wasallam) responded, ‘Go and bury him, and thereafter return.’ I enquired, ‘He passed away as a disbeliever (so should I still bury him?)’ Rasulullah (sallallahu ‘alaihi wasallam) replied, ‘Yes, go and bury him and then return.’”
According to one narration, when Hazrat ‘Ali (radhiyallahu ‘anhu) came to Rasulullah (sallallahu ‘alaihi wasallam) after burying Abu Taalib, then Rasulullah (sallallahu ‘alaihi wasallam) instructed him to make ghusl. It is for this reason that the Fuqahaa and ‘Ulamaa hold the view that it is mustahab (preferable) to make ghusl after burying a disbeliever, as established in other narrations as well.
(Extracted from Seeratul Mustafa 1/272-273)