Volume 3, Book 47, Number 799:
Narrated Ibn Shihab Az-Zuhri:
Anas bin Malik (radiallaahu `anhu) said, “When the emigrants came Medina, they had nothing whereas the Ansar had land and property. The Ansar gave them their land on condition that the emigrants would give them half the yearly yield and work on the land and provide the necessaries for cultivation.” His (i.e. Anas’s mother who was also the mother of ‘Abdullah bin Abu Talha, gave some date-palms to Allah’ Apostle (sallallaahu `alayhi wasallam) who gave them to his freed slave-girl (Um Aiman) who was also the mother of Usama bin Zaid (radiallaahu `anhu). When the Prophet (sallallaahu `alayhi wasallam) finished from the fighting against the people of Khaibar and returned to Medina, the emigrants returned to the Ansar the fruit gifts which the Ansar had given them. The Prophet also returned to Anas’s mother the date-palms. Allah’s Apostle (sallallaahu `alayhi wasallam) gave Um Aiman other trees from his garden in lieu of the old gift.
He could have just taken the trees back from her without giving any explanation and she wouldn’t have asked for a replacement, because I’m sure she knew it was temporary. But he did make up for it and that’s what makes him awesome. :)
Narrated ‘Abdullah bin ‘Umar (radiallaahu `anhu):
Umar bin Al-Khattab (radiallaahu `anhu) gave a horse in charity in Allah’s Cause and later he saw it being sold in the market and intended to purchase it. Then he went to the Prophet (sallallaahu `alayhi wasallam) and asked his permission. The Prophet (sallallaahu `alayhi wasallam) said, “Do not take back what you have given in charity.” For this reason, Ibn ‘Umar (radiallaahu `anhu) never purchased the things which he had given in charity, and in case he had purchased something (unknowingly) he would give it in charity again.
Narrated ‘Umar (radiallaahu `anhu):
Once I gave a horse in Allah’s Cause (in charity) but that person did not take care of it. I intended to buy it, as I thought he would sell it at a low price. So, I asked the Prophet (sallallaahu `alayhi wasallam) about it. He said, “Neither buy, nor take back your alms which you have given, even if the seller were willing to sell it for one Dirham, for he who takes back his alms is like the one who swallows his own vomit.”
The prohibition on buying back one’s charity is because it is given for the sake of Allaah, so one should not have any attachment to it. Buying it back implies that one is still attached to it. This prohibition also exists so that the vendor will not try to do the giver a favor which would result in him benefiting from his charity.
Can we take back charity before the recipient takes possession of it? Answer here.