Saeed bin Musayyib (may Allah have mercy on him) narrates that a woman or a man freed his six slaves, while he had no other wealth besides them. This matter was brought before the Prophet ﷺ, so he ﷺ drew lots among the slaves and freed one third of them (i.e., two). Imam Shafi’i (may Allah have mercy on him) said: This incident of freeing (the slaves) was during the illness in which the person died.
Hadith Referenceمسند الإمام الشافعي / كتاب العتق والولاء والمدبر والمكاتب وحسن الملكة / 1072
Hadith Takhrijصحيح من غير هذا الطريق: اخرجه مسلم الایمان، باب من اعتق شركاله في عبد (1667)۔