It was narrated from ‘Ali (رضي الله عنه) that he said: The Messenger of Allah (ﷺ) told me to sell two slaves who were brothers, so I sold them and separated them, I mentioned that to the Prophet (ﷺ) and he said: `Go and take them back, and only sell them together; do not separate them.”
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا عَبْدُ الْوَهَّابِ، عَنْ سَعِيدٍ، عَنْ رَجُلٍ، عَنْ الْحَكَمِ بْنِ عُتَيْبَةَ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ أَبِي لَيْلَى، عَنْ عَلِيٍّ، أَنَّهُ قَالَ أَمَرَنِي رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ أَنْ أَبِيعَ غُلَامَيْنِ أَخَوَيْنِ فَبِعْتُهُمَا فَفَرَّقْتُ بَيْنَهُمَا فَذَكَرْتُ ذَلِكَ لِلنَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَقَالَ أَدْرِكْهُمَا فَارْتَجِعْهُمَا وَلَا تَبِعْهُمَا إِلَّا جَمِيعًا وَلَا تُفَرِّقْ بَيْنَهُمَا.
sunnah.com