It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) that a man came to the court of the Prophet while he (Hazrat Abu Huraira) was also present there, and asked: O Messenger of Allah! Which deed is the best? The Holy Prophet (peace and blessings be upon him) said: To have faith in Allah and to strive in the path of Allah. He asked: Which slave's emancipation carries the greatest reward? The Holy Prophet (peace and blessings be upon him) said: The one whose price is highest and who is most valuable in the eyes of his owners. He said: If I do not have the means to free a slave, then what should I do? He replied: Help a laborer to stand on his feet or provide for a needy person so that he can earn. He asked: If I do not have the strength to do even that? He replied: Then keep yourself away from evil and sinful deeds, for this too is an excellent charity that you give on your own behalf.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 9038