Language:
كتاب الأدب
78  
Good Manners and Form (Al-Adab)
(13)
Chapter: Allah will keep good relations with him who keeps good relations with kith and kin
(13)
باب مَنْ وَصَلَ وَصَلَهُ اللَّهُ
Sahih al-Bukhari 5988

Narrated Abu Huraira:

The Prophet (ﷺ) said, "The word 'Ar-Rahm (womb) derives its name from Ar-Rahman (i.e., one of the names of Allah) and Allah said: 'I will keep good relation with the one who will keep good relation with you, (womb i.e. Kith and Kin) and sever the relation with him who will sever the relation with you, (womb, i.e. Kith and Kin).

حَدَّثَنَا خَالِدُ بْنُ مَخْلَدٍ، حَدَّثَنَا سُلَيْمَانُ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ دِينَارٍ، عَنْ أَبِي صَالِحٍ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ إِنَّ الرَّحِمَ سُجْنَةٌ مِنَ الرَّحْمَنِ، فَقَالَ اللَّهُ مَنْ وَصَلَكِ وَصَلْتُهُ، وَمَنْ قَطَعَكِ قَطَعْتُهُ ‏"‏‏.‏
Reference : Sahih al-Bukhari 5988
In-book reference : Book 78, Hadith 19
USC-MSA web (English) reference : Vol. 8, Book 73, Hadith 17
  (deprecated numbering scheme)