Sunnah.com reference : Book 7, Hadith 37English translation : Book 7, Hadith 814Arabic reference : Book 7, Hadith 811
Narrated 'Ali bin Abu Talib (RA):
Allah's Messenger (ﷺ) commanded me to sell two youths who were brothers. I sold them and separated them (by selling them to different people). When I made mention of that to the Prophet (ﷺ), he said, "Find them and get them back, and do not sell them except that they are together."

[Reported by Ahmad, and the narrators of his chain are reliable. Indeed Ibn Khuzaimah, Ibn al-Jarud, Ibn Hibban, al-Hakim, at-Tabarani and Ibn Qattan graded it Sahih (authentic)].
وَعَنْ عَلِيِّ بْنِ أَبِي طَالِبٍ ‏- رضى الله عنه ‏- قَالَ: { أَمَرَنِي رَسُولُ اَللَّهِ ‏- صلى الله عليه وسلم ‏-أَنْ أَبِيعَ غُلَامَيْنِ أَخَوَيْنِ, فَبِعْتُهُمَا, فَفَرَّقْتُ بَيْنَهُمَا، فَذَكَرْتُ ذَلِكَ لِلنَّبِيِّ ‏- صلى الله عليه وسلم ‏-فَقَالَ: أَدْرِكْهُمَا, فَارْتَجِعْهُمَا, وَلَا تَبِعْهُمَا إِلَّا جَمِيعًا }  رَوَاهُ أَحْمَدُ, وَرِجَالُهُ ثِقَاتٌ, وَقَدْ صَحَّحَهُ اِبْنُ خُزَيْمَةَ, وَابْنُ اَلْجَارُودِ, وَابْنُ حِبَّانَ, وَالْحَاكِمُ, وَالطَّبَرَانِيُّ, وَابْنُ اَلْقَطَّانِ  1‏ .‏‏1 ‏- صحيح.‏ رواه أحمد ( 760 )‏، وابن الجارود ( 575 )‏، والحاكم ( 2 / 125 )‏.‏