I heard the Messenger of Allah (ﷺ) say: If anyone emancipates a Muslim slave, that will be his ransom from Jahannam.
Sunan Abi Dawud Book 31, Hadith 41