It is narrated from Amir Sha'bi, he says: The husband of Sharaha was absent from her and he was in Syria, but Sharaha became pregnant. Her guardian brought her to Sayyiduna Ali bin Abi Talib (may Allah be pleased with him) and said: She has committed adultery, and she herself also confessed. So Sayyiduna Ali (may Allah be pleased with him) gave her one hundred lashes on Thursday and stoned her to death on Friday. A pit was dug for her up to her navel, and I was also present there. Then Sayyiduna Ali (may Allah be pleased with him) said: Verily, stoning is Sunnah; the Noble Prophet (peace and blessings be upon him) implemented it. If anyone had testified against this woman, he would have thrown the first stone, first giving testimony and then, after the testimony, throwing the stone. But this woman has confessed, so I am the first to throw a stone at her. Then he threw a stone at her, and afterwards the people threw stones. Amir says: By Allah! I am among those who killed her.
Hadith Referenceالفتح الربانی / مسائل الحدود / 6715
Benefits: … For the witness to cast the first stone, and for the ruler to cast the first stone upon the one who confesses—these are recommended (mustahabb) acts.