Abu Saeed Khudri reported,

A man from the tribe of Aslam called Maez bin Malik came to the Messenger of Allah ﷺ and said, "I have committed a grave sin, so carry out the punishment on me."The Prophet ﷺ turned him away several times. Then he asked the man's people about him, and they said, "We know of nothing wrong with him, except that he has done something from which he believes nothing can free him except that the prescribed punishment be carried out on him."So he returned to the Prophet ﷺ, who then ordered us to stone him. We took him to Baqi al-Gharqad. We did not tie him up, nor did we dig a pit for him. We threw bones, clods of dirt, and pieces of pottery at him. He ran, and we ran after him, until he reached the edge of the Harrah. There he stood facing us, and we pelted him with the large stones of the Harrah until he fell silent.Then the Messenger of Allah ﷺ stood up to address us that evening and said, "Why is it that whenever we set out on a military expedition in the path of Allah, one man stays behind among our families making sounds like the bleating of a male goat? It is incumbent upon me that no man be brought to me who has done such a thing without my making an example of him."He neither asked forgiveness for him nor cursed him.

Muslim 4428

Sahih

حدثني محمد بن المثنى حدثني عبد الأعلى حدثنا داود عن أبي نضرة

عن أبي سعيد

أن رجلا من أسلم يقال له ماعز بن مالك أتى رسول الله ﷺ فقال إني أصبت فاحشة فأقمه علي فرده النبي ﷺ مرارا قال ثم سأل قومه فقالوا ما نعلم به بأسا إلا أنه أصاب شيئا يرى أنه لا يخرجه منه إلا أن يقام فيه الحد قال فرجع إلى النبي ﷺ فأمرنا أن نرجمه قال فانطلقنا به إلى بقيع الغرقد قال فما أوثقناه ولا حفرنا له قال فرميناه بالعظم والمدر والخزف قال فاشتد واشتددنا خلفه حتى أتى عرض الحرة فانتصب لنا فرميناه بجلاميد الحرة يعني الحجارة حتى سكت قال ثم قام رسول الله ﷺ خطيبا من العشي فقال أو كلما انطلقنا غزاة في سبيل الله تخلف رجل في عيالنا له نبيب كنبيب التيس علي أن لا أوتى برجل فعل ذلك إلا نكلت به قال فما استغفر له ولا سبه

مسلم 4428صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Legal punishments
Chapter
One who confessed to committing zina
Numbering
Darussalam 4428
Muslim 4428