Assalamualaikum.
It is popularly believed in Muslim circles that apostasy (converting from a Muslim to a non-Muslim) is punishable by death.
Yet the Quran presents the exact opposite picture. Our Holy Book tells us that
There is no compulsion in religion ... [2:257]
And the Quran gives the most wonderful reason for there being no compulsion
... Surely, the right way has become distinct from error ... [2:257]
Quran tells us that the teachings of Islam are so rational that for an honest and rational human being the right and wrong way are distinct. That is why force is not at all required to prevent people from becoming non-Muslims. Force is always used when rationality fails to convince people. But the Quran tells us that if the rationality of Islam is not convincing it is because of the individual's dishonesty and he/she shall be punished in the hereafter for that.
The above-mentioned verse should be sufficient but if that leaves some of the Muslims unconvinced:
A section of the people of the Book urge some from among themselves: why not affirm, in the early part of the day, belief in that which has been revealed unto the believers and repudiate it in the latter part of the day, perchance they may turn away from their faith.
It is a hadith but a hadith stored by God in the Quran. It used to happen that the Jews would do this. These verses were revealed in Medina after Prophet Muhammad (peace and blessings of Allah be upon him) became victorious over Mekkah. But if even this is not evidence enough to convince you then:
Those who believe, then disbelieve, then again believe, then disbelieve and thereafter go on increasing in disbelief, Allah will never forgive them, nor guide them to any way of deliverance. [4.138]
No mention of corporeal punishment.
My plea to Muslims ... please stop attributing this false belief to Islam.