Bulugh al-Maram, Book 10, Hadith 1207 (In-Book)

Abu Hurairah (RAA) narrated, 'A Muslim man came to the Prophet while he was in the mosque, and called him saying, 'O Messenger of Allah! I have committed adultery.' The Messenger of Allah turned his face away from him, so the man came round (from the other side) towards his face and said, 'O Messenger of Allah! I have committed adultery.' The Messenger of Allah again turned his face away from him, but the man repeated his statement four times. When he testified four times that he did it, the Messenger of Allah called him saying, "Are you insane?" The man said, 'No.' The Messenger of Allah then asked him, "Are you married?" The man answered, 'Yes.' The Messenger of Allah said: "Take him away and stone him (to death)." Agreed upon.

وَعَنْ أَبِي هُرَيْرَةَ ‏- رضى الله عنه ‏- قَالَ: { أَتَى رَجُلٌ مِنْ اَلْمُسْلِمِينَ رَسُولُ اَللَّهِ ‏- صلى الله عليه وسلم ‏-‏-وَهُوَ فِي اَلْمَسْجِدِ‏- فَنَادَاهُ فَقَالَ: يَا رَسُولَ اَللَّهِ! إِنِّي زَنَيْتُ, فَأَعْرَضَ عَنْهُ, فَتَنَحَّى تِلْقَاءَ وَجْهِهِ, فَقَالَ: يَا رَسُولَ اَللَّهِ! إِنِّي زَنَيْتُ, فَأَعْرَضَ عَنْهُ, حَتَّى ثَنَّى ذَلِكَ عَلَيْهِ أَرْبَعَ مَرَّاتٍ, فَلَمَّا شَهِدَ عَلَى.‏ (1569)‏ نَفْسِهِ أَرْبَعَ شَهَادَاتٍ.‏ دَعَاهُ رَسُولُ اَللَّهِ ‏- صلى الله عليه وسلم ‏-فَقَالَ "أَبِكَ جُنُونٌ?" قَالَ.‏ لَا.‏ قَالَ: "فَهَلْ (1570)‏ أَحْصَنْتَ?".‏ قَالَ: نَعَمْ.‏ فَقَالَ رَسُولُ اَللَّهِ ‏- صلى الله عليه وسلم ‏-"اِذْهَبُوا بِهِ فَارْجُمُوهُ" } مُتَّفَقٌ عَلَيْهِ (1571)‏.‏ ‏2 ‏- تحرف في "أ" إلى "عليه".‏‏3 ‏- تحرف في "أ" إلى: "فها".‏‏4 ‏- صحيح رواه البخاري (5271)‏، ومسلم (1691)‏ (16)‏.‏

sunnah.com

also referenced under: Book 10, Hadith 1246 (English)