Abu Dawud Book 24, Hadith Number 3957.
Chapter : Emancipation of a slave while the master is healthy.
Narated By Abu Darda’ : The Prophet (PBUH) said: the similitude of a man who emancipates a slave at the time of his death is like that of a man who gives a present after satisfying his appetite.