Al-Kāfi

Hadith 66
willrightsspendingslavery-captives
8- عَنْهُ عَنْ مُعَاوِيَةَ بْنِ عَمَّارٍ فِي امْرَأَةٍ أَوْصَتْ بِمَالٍ فِي عِتْقٍ وَصَدَقَةٍ وَحَجٍّ فَلَمْ يَبْلُغْ قَالَ ابْدَأْ بِالْحَجِّ فَإِنَّهُ مَفْرُوضٌ فَإِنْ بَقِيَ شَيْ‏ءٌ فَاجْعَلْهُ فِي الصَّدَقَةِ طَائِفَةً وَفِي الْعِتْقِ طَائِفَةً.
8. It is narrated from the narrator of the previous Hadith from Mu‘awiyah ibn ‘Ammar who has narrated the following: “About the case of a woman who makes a will to set free a slave, pay charity and al-Hajj but there is not enough, he (the Imam) (a.s.), said that first is al-Hajj because it is obligatory and if anything remains extra then spend something on charity and something for setting free a slave.’”
Source: Shaykh Muḥammad b. Yaʿqūb al-Kulaynī