Sayyiduna Anas bin Malik (may Allah be pleased with him) narrates: A woman came to the Prophet (peace and blessings be upon him) and said: "O Messenger of Allah, I am pregnant; carry out the prescribed punishment (hadd) on me." The Prophet (peace and blessings be upon him) said: "We will not kill what is in your womb." The woman went away. When she had given birth, she came and said: "I have given birth." The Prophet (peace and blessings be upon him) said: "Go and nurse him until you wean him (you will not be punished before that)." Then, when she had weaned the child, she came and said: "O Messenger of Allah, I have weaned him." The Prophet (peace and blessings be upon him) said: "Go and look after him." She went away. Then she and her sister came walking. The Prophet (peace and blessings be upon him) was struck with wonder at this woman's steadfastness. Then the Prophet (peace and blessings be upon him) ordered that she be stoned. Then the Prophet (peace and blessings be upon him) said to a man: "Go, and when this woman is placed in her pit, stand in front of her so that you are right before her eyes, and speak to her privately." Then he ordered another man and said: "Go to a large stone, come at this woman from behind, and strike her with it and crush her (that is, kill her)."
Al-Tabarani recorded it in al-Mu'jam al-Awsat; its chain contains a narrator whom I do not know.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الحدود والديات / 10613