Jami` at-Tirmidhi, Book 47, Hadith 3384 (In-Book)

Narrated 'Ali: "I heard a man seeking forgiveness for his parents who were idolaters, so I said to him: 'You seek forgiveness for your parents while they are idolaters?' He said: 'Did Ibrahim not seek forgiveness for his father, and he was an idolater?' So I mentioned that to the Prophet and (the following) was revealed: It is not for the Prophet nor those who believe, that they should seek forgiveness for the idolaters (9:113)."

حَدَّثَنَا مَحْمُودُ بْنُ غَيْلاَنَ، حَدَّثَنَا وَكِيعٌ، حَدَّثَنَا سُفْيَانُ، عَنْ أَبِي إِسْحَاقَ، عَنْ أَبِي الْخَلِيلِ، كُوفِيٌّ عَنْ عَلِيٍّ، قَالَ سَمِعْتُ رَجُلاً، يَسْتَغْفِرُ لأَبَوَيْهِ وَهُمَا مُشْرِكَانِ فَقُلْتُ لَهُ أَتَسْتَغْفِرُ لأَبَوَيْكَ وَهُمَا مُشْرِكَانِ ‏.‏ فَقَالَ أَوَلَيْسَ اسْتَغْفَرَ إِبْرَاهِيمُ لأَبِيهِ وَهُوَ مُشْرِكٌ فَذَكَرْتُ ذَلِكَ لِلنَّبِيِّ صلى الله عليه وسلم فَنَزَلَتْ ‏:‏ ‏(‏ مَا كَانَ لِلنَّبِيِّ وَالَّذِينَ آمَنُوا أَنْ يَسْتَغْفِرُوا لِلْمُشْرِكِينَ ‏)‏ ‏.‏ قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ قَالَ وَفِي الْبَابِ عَنْ سَعِيدِ بْنِ الْمُسَيَّبِ عَنْ أَبِيهِ ‏.‏

sunnah.com