Alsalamu Alaykum
How shall Allah guide a people who have disbelieved after their faith and [after] bearing witness that the Apostle is true, and [after] manifest proofs had come to them? Allah does not guide the wrongdoing lot. Their requital is that there shall be upon them the curse of Allah, the angels, and all mankind. They will remain in it [forever], and their punishment will not be lightened, nor will they be granted any respite, except such as repent after that and make amends, for Allah is all-forgiving, all-merciful. Indeed those who turn faithless after their faith, and then advance in faithlessness, their repentance will never be accepted, and it is they who are the astray. Indeed those who turn faithless and die while they are faithless, a world of gold will not be accepted from any of them should he offer it for ransom. For such there will be a painful punishment, and they will have no helpers. [The Qur'ān 3:86-91]
The issue of apostasy (irtidād) and the punishment that Islam has prescribed for an apostate is one of the least known and understood part of the shari`ah (Islamic laws).
The most important reason to forbid “apostasy” in Islam refers to its concept. Actually, “apostasy” is equal to treason. This concept of “apostasy” and “treason” in many cultures, societies and countries are limited whereas they possess extensive meanings in Islam. For example, in England, treason is limited to include political and military aspects whereas in Islam, the concept of treason is not limited to them; it also has spiritual and cultural dimension to it. In the Islamic order of sacredness, Allah, then the Prophet, and then the Qur'ān occupy the highest positions.
Tawhid, nubuwwa, and qiyāma form the constitution of Islam. Just as upholding and protecting the constitution of a country is sign of patriotism, and undermining it is a form of treason - in the same way open rejection of the fundamental beliefs of Islam by a Muslim is an act of treason.
Apostasy, i.e., the public declaration of rejecting the fundamentals of Islam, has also negative influence on the Muslim society; it is indeed a major fitna. And that is why Islam has prescribed harsh punishment for irtidād.
It must be emphasized that the irtidād involves open rejection, without any force and with full realization of what one's statements or actions imply. If a Muslim has a genuine doubt on an Islamic matter, that process of doubting does not automatically classify him as a murtad.
As long as he is still in state of doubt, the punishment of irtidād is suspended. A murtad must fully realize the implications of his open rejection and what it means casting doubt on the truth and honesty of Prophet Muhammad (peace be upon him) as the Messenger of God.
The punishment prescribed by the shari`ah for apostasy is death. Even the terms used by the shari`ah for apostates give the idea of treason to this whole phenomenon. "Murtad" means apostate. Murtad can be of two types: fitri and milli.
(1) "Murtad Fitri" means a person who is born of a Muslim parent and then he rejects Islam. "Fitrah" means creation. The term "murtad fitri" implies that the person has apostate from the faith in which he was born.
(2) "Murtad Milli" means a person who converted to Islam and then later on he rejects Islam. Milli is from millat which means religion. The term "murtad milli" implies that the person has apostatized from his religion and the Muslim community.
In the first case, the apostasy is like the treason against God; whereas in the second case, the apostasy is like the treason against the Muslim community. Probably, that is why the Sh`iah jurisprudence deals with these two kinds of murtads differently:
• A former kāfir who became a Muslim and then apostates (murtad milli), he is given a second chance: if he repents, then he is not to be killed; but if he does not repent, then he is to be killed.
• But one who is born as a Muslim and then apostates (murtad fitri), he is to be killed even if he repents. It is important to understand that in case a murtad fitri repents, Allāh may accept his repentance and he may be forgiven in the hereafter, but he still has to go through the punishment prescribed for his treason in this world.
This punishment is only applicable in case of apostasy by men; in case of women, the punishment is not death but life imprisonment. And if such a woman repents, then her repentance is accepted and the punishment is lifted.
Read more about “apostasy in Islam” in;
https://www.al-islam.org/articles/apostacy-islam-sayyid-muhammad-rizvi
http://www.islamquest.net/en/archive/question/fa4761