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.
tabarani:19617ʿAbdullāh b. Muḥammad b. Saʿīd b. Abū Maryam > Muḥammad b. Yūsuf al-Firyābī > And Rqāʾ b. ʿUmar > Ibn Abū Najīḥ

[Machine] Narrated by Mujahid, in his saying {And let not those of virtue among you and wealth swear not to give [aid] to their relatives and the needy and the emigrants for the cause of Allah, and let them pardon and overlook. Would you not like that Allah should forgive you? And Allah is Forgiving and Merciful}. Abu Bakr swore that an orphan would not benefit from his companionship, and this news spread, meaning it spread to Aisha. When this verse was revealed, Abu Bakr said, "I love that Allah may forgive me and I will be better to Him than I was."  

الطبراني:١٩٦١٧حَدَّثَنَا عَبْدُ اللهِ بْنُ مُحَمَّدِ بْنِ سَعِيدِ بْنِ أَبِي مَرْيَمَ ثنا مُحَمَّدُ بْنُ يُوسُفَ الْفِرْيَابِيُّ ثنا وَرْقَاءُ بْنُ عُمَرَ عَنِ ابْنِ أَبِي نَجِيحٍ

عَنْ مُجَاهِدٍ فِي قَوْلِهِ {وَلَا يَأْتَلِ أُولُو الْفَضْلِ مِنْكُمْ وَالسَّعَةِ أَنْ يُؤْتُوا أُولُو الْقُرْبَى وَالْمَسَاكِينَ وَالْمُهَاجِرِينَ فِي سَبِيلِ اللهِ وَلْيَعْفُوا وَلْيَصْفَحُوا أَلَا تُحِبُّونَ أَنْ يَغْفِرَ اللهُ لَكُمْ وَاللهُ غَفُورٌ رَحِيمٌ} قَالَ كَانَ أَبُو بَكْرٍ حَلَفَ أَنْ لَا يَنْفَعَ يَتِيمًا فِي حِجْرِهِ أَشَاعَ ذَلِكَ يَعْنِي فِي عَائِشَةَ فَلَمَّا نَزَلَتْ هَذِهِ الْآيَةُ قَالَ أَنَا أُحِبُّ أَنْ يَغْفِرَ اللهُ لِي وَلَأَكُونَنَّ لَهُ خَيْرًا مِمَّا كُنْتُ  


See similar narrations below:

Collected by Qurʾān
quran:24:22

And let not those of virtue among you and wealth swear not to give ˹aid˺ to their relatives and the needy and the emigrants for the cause of Allah, and let them pardon and overlook. Would you not like that Allah should forgive you? And Allah is Forgiving and Merciful.  

And do not let those of you who possess bounty, the wealthy, and the affluent swear not to give to the near of kin and the poor and those who emigrate in the way of God — this was revealed regarding Abū Bakr who swore to provide no more for Mistah, his maternal cousin, a destitute Emigrant who had fought at ˹the battle of˺ Badr, because of his involvement in the calumny, when thitherto he had provided for him. And ˹it was revealed also regarding˺ certain Companions who swore not to give voluntary alms to those who had participated in ˹spreading˺ the calumny in any way. Let them forgive and excuse, them in this matter. Do you not love that God should forgive you? And God is Forgiving, Merciful, to believers. Abū Bakr said: ‘Indeed. I would love that God forgive me’, and he restored ˹thereafter˺ to Mistah what he used to expend on him.
القرآن:٢٤:٢٢

وَلَا يَأْتَلِ أُولُو الْفَضْلِ مِنْكُمْ وَالسَّعَةِ أَنْ يُؤْتُوا أُولِي الْقُرْبَىٰ وَالْمَسَاكِينَ وَالْمُهَاجِرِينَ فِي سَبِيلِ اللَّهِ ۖ وَلْيَعْفُوا وَلْيَصْفَحُوا ۗ أَلَا تُحِبُّونَ أَنْ يَغْفِرَ اللَّهُ لَكُمْ ۗ وَاللَّهُ غَفُورٌ رَحِيمٌ  

{ولا يأتل} يحلف {أولوا الفضل} أصحاب الغنى {منكم والسعة أن} لا {يؤتوا أولي القربى والمساكين والمهاجرين في سبيل الله} نزلت في أبي بكر حلف أن لا ينفق على مسطح وهو ابن خالته مسكين مهاجر بدري لما خاض في الإفك بعد أن كان ينفق عليه، وناس من الصحابة أقسموا أن لا يتصدقوا على من تكلم بشيء من الإفك {وليعفوا وليصفحوا} عنهم في ذلك {ألا تحبون أن يغفر الله لكم والله غفور رحيم} للمؤمنين قال أبو بكر: بلى أنا أحب أن يغفر الله لي ورجع إلى مسطح ما كان ينفقه عليه.