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:64:14

O you who have believed, indeed, among your wives and your children are enemies to you, so beware of them. But if you pardon and overlook and forgive - then indeed, Allah is Forgiving and Merciful.  

O you who believe! Indeed among your wives and children there are enemies for you, so beware of them, of obeying them in neglecting ˹the performance of˺ good ˹deeds˺, such as struggling or emigrating — because the reason why this verse was revealed was ˹precisely their˺ obedience ˹of them˺ in such ˹matters˺. And if you pardon, them, for their impeding you from such good ˹deeds˺, justifying it on account of the distress that parting with you causes them, and overlook ˹such enmity˺ and forgive, then assuredly God is Forgiving, Merciful.
القرآن:٦٤:١٤

يَا أَيُّهَا الَّذِينَ آمَنُوا إِنَّ مِنْ أَزْوَاجِكُمْ وَأَوْلَادِكُمْ عَدُوًّا لَكُمْ فَاحْذَرُوهُمْ ۚ وَإِنْ تَعْفُوا وَتَصْفَحُوا وَتَغْفِرُوا فَإِنَّ اللَّهَ غَفُورٌ رَحِيمٌ  

{يا أيها الذين آمنوا إن من أزواجكم وأولادكم عدوّا لكم فاحذروهم} أن تطيعوهم في التخلف عن الخير كالجهاد والهجرة فإن سبب نزول الآية الإطاعة في ذلك {وإن تعفوا} عنهم في تثبيطهم إياكم عن ذلك الخير معتلين بمشقة فراقكم عليهم {وتصفحوا وتغفروا فإن الله غفور رحيم}.

See similar narrations below:

Collected by Ṭabarānī
tabarani:11720Muḥammad b. al-ʿAbbās a freed slave of Banī Hāshim > ʿAbdullāh b. Ṣāliḥ al-ʿIjlī > Isrāʾīl > Simāk b. Ḥarb > ʿIkrimah

[Machine] These are men from the people of Mecca who embraced Islam and wanted to come to the Messenger of Allah to seek knowledge of the religion. When they came to the Messenger of Allah and demonstrated understanding in the religion, they wanted to be rewarded. So Allah revealed, "O you who have believed, indeed, among your wives and your children are enemies to you, so beware of them. But if you pardon and overlook and forgive – then indeed, Allah is Forgiving and Merciful."  

الطبراني:١١٧٢٠حَدَّثَنَا مُحَمَّدُ بْنُ الْعَبَّاسِ مَوْلَى بَنِي هَاشِمٍ ثنا عَبْدُ اللهِ بْنُ صَالِحٍ الْعِجْلِيُّ ثنا إِسْرَائِيلُ عَنْ سِمَاكِ بْنِ حَرْبٍ عَنْ عِكْرِمَةَ عَنِ ابْنِ عَبَّاسٍ فِي هَذِهِ الْآيَةِ {يَا أَيُّهَا الَّذِينَ آمَنُوا إِنَّ مِنْ أَزْوَاجِكُمْ وَأَوْلَادِكُمْ عَدُوًّا لَكُمْ فَاحْذَرُوهُمْ} قَالَ

هَؤُلَاءِ رِجَالٌ أَسْلَمُوا مِنْ أَهْلِ مَكَّةَ فَأَرَادُوا أَنْ يَأْتُوا رَسُولَ اللهِ ﷺ فَلَمَّا أَتَوْا رَسُولَ اللهِ ﷺ وفَقِهُوا فِي الدِّينِ أَرَادُوا أَنْ يُعَاقِبُوهُمْ فَأَنْزَلَ اللهُ ﷻ {يَا أَيُّهَا الَّذِينَ آمَنُوا إِنَّ مِنْ أَزْوَاجِكُمْ وَأَوْلَادِكُمْ عَدُوًّا لَكُمْ فَاحْذَرُوهُمْ وَإِنْ تَعْفُوا وتَصْفَحُوا وتَغْفِرُوا فَإِنَّ اللهَ غَفُورٌ رَحِيمٌ}