Sayyiduna Abu Dharr al-Ghifari (may Allah be pleased with him) narrates: We were travelling with the Prophet (peace and blessings be upon him) when a man came to him and said: "This wretched one has committed adultery." The Prophet (peace and blessings be upon him) turned his face away from him. Then he did the same a third time, and a fourth time, so the Prophet (peace and blessings be upon him) dismounted. On one occasion the narrator used these words: He confessed to adultery before the Prophet (peace and blessings be upon him), and the Prophet (peace and blessings be upon him) sent him back four times. Then he dismounted and ordered us, and we dug a pit for him that was not very deep, and then he was stoned. Then the Prophet (peace and blessings be upon him) set off, and he was distressed and grieved. We travelled on until we halted at a stopping place. When that state left the Prophet (peace and blessings be upon him), he said to me: "O Abu Dharr, did you not see that man? He has been forgiven and admitted into Paradise."
Ahmad and al-Bazzar recorded it; its chain contains al-Hajjaj bin Artah, who is a mudallis (one who conceals defects in his chain).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الحدود والديات / 10606