Hadithcore
Mishkat al-Masabih, 3373

‘Abdallah b. Mas'ud said that when captives were brought to the Prophet (ﷺ) he gave families together through dislike of separating them. Ibn Majah transmitted it.

وَعَنْ عَبْدِ اللَّهِ بْنِ مَسْعُودٍ قَالَ: كَانَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا أُتِيَ بِالسَّبْيِ أَعْطَى أَهْلَ الْبَيْتِ جَمِيعًا كَرَاهِيَةَ أَنْ يفرق بَينهم. رَوَاهُ ابْن مَاجَه

References1 variant
In-Book Reference
Book 13, Hadith 285