Sunan Abi Dawud, Book 31, Hadith 41 (Abu Dawud 3967)

Amr ibn Abasah, said that Marrah ibn Ka'b said:

I heard the Messenger of Allah (ﷺ) say: If anyone emancipates a Muslim slave, that will be his ransom from Jahannam.