Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:9:114

And the request of forgiveness of Abraham for his father was only because of a promise he had made to him. But when it became apparent to Abraham that his father was an enemy to Allah, he disassociated himself from him. Indeed was Abraham compassionate and patient.  

Abraham’s prayer for the forgiveness of his father was only because of a promise he had made to him, when he said to him, I will ask my Lord forgiveness for you ˹Q. 19:47˺, in the hope that he would submit ˹to God˺; but when it became clear to him that he was an enemy of God, upon his death as an disbeliever, he declared himself innocent of him, and refrained from asking forgiveness for him; truly Abraham was soft of heart, making frequent entreaty and supplication ˹to God˺, forbearing, enduring harm patiently.
القرآن:٩:١١٤

وَمَا كَانَ اسْتِغْفَارُ إِبْرَاهِيمَ لِأَبِيهِ إِلَّا عَنْ مَوْعِدَةٍ وَعَدَهَا إِيَّاهُ فَلَمَّا تَبَيَّنَ لَهُ أَنَّهُ عَدُوٌّ لِلَّهِ تَبَرَّأَ مِنْهُ ۚ إِنَّ إِبْرَاهِيمَ لَأَوَّاهٌ حَلِيمٌ  

(وما كان استغفار إبراهيم لأبيه إلا عن موعدة وعدها إياه) بقوله "" سأستغفر لك ربي "" رجاء أن يسلم (فلما تبين له أنه عدو لله) بموته على الكفر (تبرأ منه) وترك الاستغفار له (إن إبراهيم لأواه) كثير التضرع والدعاء (حليم) صبور على الأذى.