'Imran bin Husain (RAA) narrated, 'A man who had no other property emancipated six of his slaves at the time of his death. Allah's Messenger (ﷺ)sent for them, and after dividing them into three groups, he cast lots among them, set two of them free and kept four in slavery, and spoke very harshly to the man (who emancipated them).' Related by Muslim.
English reference: Book 15, Hadith 1470
Arabic reference: Book 15, Hadith 1426