The following are examples of the Prophet’s treatment of those who apostatized during his lifetime. I have also included links to the information to check the sources:
The Qur’anic verse 2:256 states ‘la ikraha fid-din (meaning: there is no compulsion in religion).’ This ayah is explicit in its claim that Islam’s aim is not compulsion. The following example shows how the prophet (saw) demonstrated this verse in a particular instance:
In the Qur’anic commentaries it is written that an Ansar companion of the Prophet (S) who had previously been a polytheist had two sons who had become Christians. He went to the Prophet (S) and said to him: “O Messenger of Allah! What can I do to these two sons of mine that have become Christians? Do you give me permission to force them to leave their religion and become Muslims?” The Prophet (S) said: “No! There is no compulsion in religion.” 
EXAMINATION OF HADITHS
Some comment may be offered on the Hadiths that are set forth in support of the position by those who contend that apostasy is punishable with death. One Hadith states that Abi Qalabah reported on the authority of Anas:
Some people of Akal or Urainah came to Medina and found that its climate disagreed with them. The Holy Prophet told them to go and stay among his she-camels outside Medina and drink their milk. They followed his instructions, and when they were fully restored they tortured and killed the Holy Prophet's keeper of the camels and drove away the camels. They then declared themselves apostates to Islam. When the Holy Prophet was informed of this incident, he sent some men after them who caught them and brought them to the Holy Prophet. He directed that they should be tortured in the same way as they had tortured his keeper of the camels.
Now, it is true that those people had become apostates, but it is quite clear that the penalty imposed upon them was not in respect of their apostasy, but on account of their torturing and killing the Holy Prophet's keeper of his camels. This Hadith, therefore, does not in any manner lend support to the thesis that apostasy is punishable with death.
Another instance that is cited in support of the thesis that apostasy is punishable with death is the case of Ibn Khatal who was one of the four people who were executed on the occasion of the fall of Mecca. It is true that he was an apostate, but it is not a fact that he was executed on account of his apostasy. His case is set out in Mawahibal Ludunniyyah where it states:
The Holy Prophet directed the execution of Ibn Khatal. He had been a Muslim and the Holy Prophet (saaw), had sent him to collect the zakat. He was accompanied by an Ansari and a freed man of his who served him and who was a Muslim. They arrived at a place where they were to spend the night and he directed the freed man to slaughter a goat and to prepare dinner. Having given this direction, he went to sleep and when he woke up, he found that the freed man had done nothing for the preparation of dinner. He was intensely annoyed and set upon the freed man and killed him. He then repudiated Islam and reverted to paganism, and went to Mecca and settled down there.
This recital makes it quite clear that Ibn Khatal was not executed as a punishment for his apostasy, but on account of his murder of the Muslim freed man.
Our thesis is not that no apostate has ever been punished. We concede that there are several instances of the execution of apostates, but in each case the execution was for some offence committed by the apostate and not on account of his apostasy. We repeat that there has not been a single case in which the Holy Prophet (saaw), directed the execution of an apostate whose only default was that he had repudiated Islam and who had not been guilty of any offence attracting the penalty of death.
The third case which is cited in support of the advocates of the penalty of death for apostasy is that of Maqees bin Sababah who was also executed on the occasion of the fall of Mecca. Concerning him Zarqani has recorded in his commentary on Mawahibal Ludunniyyah:
Maqees bin Sababah had become a Muslim and thereafter he killed an Ansari who had killed his brother Hisham during the campaign of Zeeqard, mistakenly thinking that he was one of the enemies. After that incident Maqees had accepted blood money in respect of his brother from the Ansari, and yet, he killed the Ansari. He then repudiated Islam and went to Mecca and joined the Quraish. This again is a case where an apostate was executed on account of a treacherous murder that he had committed.
Having met nothing but frustration in their search for a genuine case of execution on account of simple apostasy, those who differ with us on this question have been driven to rely upon two utterly unreliable Hadiths, each of which mentions the execution of a woman on account of her apostasy. These two Hadiths are false on the face of them as there is good authority affirming that the Holy Prophet, peace be on him, never directed the execution of a woman for apostasy.
In certain Hadiths it is merely mentioned as a hypothesis that an apostate deserves to be executed, but in every one of those Hadiths, a qualification is added which requires that the apostate should have fought the Muslims or should have committed some other offence. It is not necessary, therefore, to examine those Hadiths in detail.
3. APOSTATE PARDONED BY HOLY PROPHET
Abdullah bin Abi Sarah was one of the scribes of the Holy Prophet (saaw), in Medina. He became an apostate and went and joined the Meccans and identified himself with them. On the fall of Mecca, he was among those few persons who were condemned to death by the Holy Prophet (saaw), on account of their misdeeds. He was a foster brother of Hazrat Usman bin Affan, who gave him shelter in his house where he remained hidden for some days. When order was restored in Mecca, Hazrat Usman interceded with the Holy Prophet on his behalf, who remained silent for a while and then signified his forgiveness of Abdullah. This incident is mentioned both in the Tafseer Kabeer of Imam Razi (Vol. V, p.527), and in the commentary Ruhul Maani (Vol. IV, p.484).
This incident also furnishes clear proof that there was no penalty for apostasy in Islam. Abdullah bin Abi Sarah had been condemned on account of his misdeeds and not on account of his apostasy. Had the punishment for apostasy been death, Hazrat Usman would never have given him shelter, and the Holy Prophet would never have accepted Hazrat Usman's intercession on his behalf.
It is well known that the Holy Prophet never accepted any intercession in respect of the prescribed punishment for an offence. If anyone attempted intercession in such a case, the Holy Prophet rejected it and was gravely displeased with the intercessor. This is well illustrated by the case of a woman of the Makhzoom who had been found guilty of theft. Bukhari has related on the authority of Aisha:
The Quraish were much disturbed on account of a Makhzoomi woman who had committed theft. They consulted together and wondered who could approach the Holy Prophet (saaw), on her behalf, except Usamah bin Zaid, whom the Holy Prophet held dear. They persuaded Usamah to approach the Holy Prophet, and intercede on behalf of the woman. When he did so, the Holy Prophet rebuked him: Do you intercede in respect of a penalty prescribed by Allah? Then he stood up and, addressing his companions, said: Many people before you went astray because they overlooked the offence of a person belonging to a good family and imposed the prescribed penalty upon a common thief. I call God to witness that if Fatimah, daughter of Muhammad, were to be guilty of theft, I would certainly cut off her hand (Bukhari, Indian edition, p.lOO3).
Thus it can be seen what the attitude was of the Holy Prophet in respect of prescribed penalties. Had Abdullah bin Abi Sarah been liable to the penalty of death on account of his apostasy, the Holy Prophet would never have accepted Hazrat Usman's intercession on his behalf and would have responded to Hazrat Usman in the same way as he had responded to Usamah bin Zaid.