كتاب الزكاة
12  
The Book of Zakat
(15)
Chapter: Charity given on behalf of the deceased will reach him
(15)
باب وُصُولِ ثَوَابِ الصَّدَقَةِ عَنِ الْمَيِّتِ، إِلَيْهِ ‏‏
Sahih Muslim 1004 a

'A'isha said that a person came to the Messenger of Allah (ﷺ) and said:

My mother died suddenly without having made any will. I think she would have definitely given Sadaqa if she had been able to speak. Would she have a reward if I gave Sadaqa on her behalf? He (the Holy Prophet) said: Yes.
وَحَدَّثَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ نُمَيْرٍ، حَدَّثَنَا مُحَمَّدُ بْنُ بِشْرٍ، حَدَّثَنَا هِشَامٌ، عَنْ أَبِيهِ، عَنْ عَائِشَةَ، أَنَّ رَجُلاً، أَتَى النَّبِيَّ صلى الله عليه وسلم فَقَالَ يَا رَسُولَ اللَّهِ إِنَّ أُمِّيَ افْتُلِتَتْ نَفْسَهَا وَلَمْ تُوصِ وَأَظُنُّهَا لَوْ تَكَلَّمَتْ تَصَدَّقَتْ أَفَلَهَا أَجْرٌ إِنْ تَصَدَّقْتُ عَنْهَا قَالَ ‏ "‏ نَعَمْ ‏"‏.‏
Reference : Sahih Muslim 1004a
In-book reference : Book 12, Hadith 63
USC-MSA web (English) reference : Book 5, Hadith 2196
  (deprecated numbering scheme)