God sent Muhammad with the truth and sent down the Book to him, and the verse of stoning was included in what God most high sent down. God's Messenger had people stoned to death and we have done it also since his death. Stoning is a duty laid down in God’s Book for married men and women who commit fornication when proof is established, or if there is pregnancy, or a confession.
Zaid b. Khalid told that he heard God’s Messenger giving command that an unmarried man who committed fornication should receive a hundred lashes and be banished for a year.
‘Ubada b. as-Samit reported the Prophet as saying, “Receive my teaching, receive my teaching God has appointed a way for those women (Cf. Al-Qur'an, 4:15). When the parties are unmarried they shall receive a hundred lashes and be banished for a year when they commit fornication and when they have been married they shall receive a hundred lashes and be stoned to death.”
Abu Huraira and Zaid b. Khalid told that two men brought a dispute before God’s Messenger, one of them saying, "Pronounce judgment between us in accordance with God’s Book," and the other saying, "Yes Messenger of God, pronounce judgment between us in accordance with God’s Book, and allow me to speak." He told him to speak and he said, "My son who was a hired servant with this man committed fornication with his wife, and when I was told that my son must be stoned to death I ransomed him with a hundred sheep and a slave girl of mine; but when I asked the learned they told me that my son should receive a hundred lashes and be banished for a year, and that stoning to death applied only to the man’s wife." God’s Messenger replied, "By Him in whose hand my soul is, I shall certainly pronounce judgment between you in accordance with God's Book. Your sheep and your slave girl must be returned to you, and your son shall receive a hundred lashes and be banished for a year. As for you, Unais, go to this man's wife, and if she confesses stone her to death." She confessed and he stoned her.