Stoning for adultery was sent down from Allah, but is missing from the Quran.
Currently punishment is in surah 24:2
Chapter 3: PRESCRIBED PUNISHMENT FOR AN ADULTERER AND AN ADULTERESS
Sahih Muslim Bk 17, Number 4191:
'Ubada b. as−Samit reported: Allah's Messenger (may peace be upon him) as saying: Receive (teaching) from me, receive (teaching) from me. Allah has ordained a way for those (women). When an unmarried male commits adultery with an unmarried female (they should receive) one hundred lashes and banishment for one year. And in case of married male committing adultery with a married female, they shall receive one hundred lashes and be stoned to death.
Sahih Muslim Bk 17, Number 4192:
'Ubada b. as−Samit reported that whenever Allah's Apostle (may peace be upon him) received revelation, he felt its rigour and the complexion of his face changed. One day revelation descended upon him, he felt the same rigour. When it was over and he felt relief, he said: Take from me. Verily Allah has ordained a way for them (the women who commit fornication),: (When) a married man (commits adultery) with a married woman, and an unmarried male with an unmarried woman, then in case of married (persons) there is (a punishment) of one hundred lashes and then stoning (to death). And in case of unmarried persons, (the punishment) is one hundred lashes and exile for one year.
Sahih Muslim Bk 17, Number 4193:
This hadith has been reported on the authority of Qatada with the same chain of transmitters except with this variation that the unmarried is to be lashed and exiled, and the married one is to be lashed and stoned. There is neither any mention of one year nor that of one hundred.
Chapter 4: STONING OF A MARRIED ADULTERER
Sahih Muslim Bk 17, Number 4194:
'Abdullah b. 'Abbas reported that 'Umar b. Khattab sat on the pulpit of Allah's Messenger (may peace be upon him) and said: Verily Allah sent Muhammad (may peace be upon him) with truth and He sent down the Book upon him, and the verse of stoning was included in what was sent down to him. We recited it, retained it in our memory and understood it. Allah's Messenger (may peace be upon him) awarded the punishment of stoning to death (to the married adulterer and adulteress) and, after him, we also awarded the punishment of stoning, I am afraid that with the lapse of time, the people (may forget it) and may say: We do not find the punishment of stoning in the Book of Allah, and thus go astray by abandoning this duty prescribed by Allah. Stoning is a duty laid down in Allah's Book for married men and women who commit adultery when proof is established, or it there is pregnancy, or a confession.
Sahih Muslim Bk 17, Number 4195:
This hadith has been narrated on the authority of Zuhri with the same chain of transmitters.
Chapter 5: HE WHO CONFESSES HIS GUILT OF ADULTERY
Sahih Muslim Bk 17, Number 4196:
Abu Huraira reported that a person from amongst the Muslims came to Allah's Messenger (may peace be upon him) while he was in the mosque. He called him saying: Allah's Messenger. I have committed adultery. He (the Holy Prophet) turned away from him, He (again) came round facing him and said to him: Allah's Messenger, I have committed adultery. He (the Holy Prophet) turned away until he did that four times, and as he testified four times against his own self, Allah's Messenger (may peace be upon him) called him and said: Are you mad? He said: No. He (again) said: Are you married? He said: Yes. Thereupon Allah's Messenger (may peace be upon him) said: Take him and stone him. Ibn Shihab (one of the narrators) said: One who had heard Jabir b. 'Abdullah saying this informed me thus: I was one of those who stoned him. We stoned him at the place of prayer (either that of 'Id or a funeral). When the stones hurt him, he ran away. We caught him in the Harra and stoned him (to death). This hadith has been narrated through another chain of transmitters.
Sahih Muslim Bk 17, Number 4197:
This hadith has been narrated on the authority of Abu Huraira through other chains of transmitters.
Sahih Muslim Bk 17, Number 4198:
Jabir b. Samura reported: As he was being brought to Allah's Apostle (may peace be upon him) I saw Ma'iz b. Malik−a short−statured person with strong sinews, having no cloak around him. He bore witness against his own self four times that he had committed adultery, whereupon Allah's Messenger (may peace be upon him) said: Perhaps (you kissed her or embraced her). He said: No. by God, one deviating (from the path of virtue) has committed adultery. He then got him stoned (to death), and then delivered the address: Behold, as we set out for Jihad in the cause of Allah, one of you lagged behind and shrieked like the bleating of a male goat, and gave a small quantity of milk. By Allah, in case I get hold of him, I shall certainly punish him.