Answered by Shaykh Faraz Rabbani
Is it permissible to make du’a for non-Muslims who have passed away?
There is a useful summary of the discussions of the fuqaha on this point in two entries of al-Mawsu`a al-Fiqhiyya (Kuwait):
“Seeking forgiveness for a non-Muslim. The fuqaha are agreed that seeking forgiveness for a non-Muslim is interdicted… However, if one seeks forgiveness for a non-Muslim hoping that they become Muslim and thus be forgiven, the Hanafi scholars have permitted it…
Praying for mercy for a non-Muslim. Nawawi stated in his al-Adhkar that… it is permitted to pray for guidance for non-Muslims, good health and well-being (`afiya), and the like of it, because of the hadith of Anas (Allah be pleased with him) that, “The Prophet (Allah bless him & give him peace) asked for water and a Jew gave him some, so the Prophet (Allah bless him & give him peace) said to him, ‘May Allah make you beautiful,’ so the man did not see grey hair till he died.” As for after their death, it is impermissible (haram) to make dua for forgiveness and the like for a non-Muslim, for Allah Most High said, “It is not for the Prophet and those who believe to pray for the forgiveness of idolators even though they may be near of kin after it has become clear that they are people of hell-fire.” [Qur’an, 9: 113] There are hadiths that indicate this, and there is scholarly consensus (ijma`) on this matter.” [al-Mawsu`a al-Fiqhiyya, Kuwait]
And Allah knows best.