Sayyiduna Abu Hurayrah (may Allah be pleased with him) narrates: A man came to the Prophet (peace and blessings be upon him) and said: O Prophet of Allah! Which deed is most virtuous? He said: Faith in Allah Almighty and striving in the path of Allah. He said: Which (of the) slaves (to be freed) brings the greatest reward? The Prophet (peace and blessings be upon him) said: The one with the highest price and the most valued by its owner. He said: And if I am not able to do that? The Prophet (peace and blessings be upon him) said: Then help a worker, or do some work for one who is incapable. He said: And if I am not able to do even that? The Prophet (peace and blessings be upon him) said: Restrain yourself from evil! For that is a charity and a good deed that you give on behalf of yourself. (Allamah al-Haythami says:) I say: The opening part of this narration is recorded in the "Sahih".
Ahmad recorded it, and its narrators are thiqat (trustworthy).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب العتق / 7247