Mishkat al-Masabih #3230
Marriage
The Arabic includes the chain of narration (sanad) and the collector's commentary; the English translation shows the Prophet's words only.
وَعَنْهُ أَنَّهُ فَرَّقَ بَيْنَ جَارِيَةٍ وَوَلَدِهَا فَنَهَاهُ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ عَنْ ذَلِكَ فردَّ البَيعَ. رَوَاهُ أَبُو دَاوُد مُنْقَطِعًا
He said he separated a slave girl from her child, but when the Prophet forbade him to do that he cancelled the transaction.
Abu Dawud transmitted it with a break in the isnad.
About Mishkat al-Masabih
This hadith is #3230 from Mishkat al-Masabih, in the Book of Marriage.