The reconciliation is that one is a general ruling (عموم), while the other is about a specific case (خصوص), i.e. an exception.
A true contradiction would have existed if:
- the hadith too had a generic scope, e.g if it said "kill every non-muslim" OR
- the verse too had a specific scope, and the specified subject was the same group e.g. if it said "let there be no compulsion for apostates"
In the absence of the above, both laws supplement each other, and both are applied: people are not compelled to accept Islam, but those who leave Islam are compelled to return.
There are many examples in the Quran of where an exception exists to a general ruling in a verse, even though it is not mentioned in the immediate context:
Kuffar and Mushriqeen can not be married:
ولا تمسكوا بعصم الكوافر
And hold not to marriage bonds with disbelieving women
— Quran 60:10
ولا تنكحوا المشركات حتى يؤمن
And do not marry polytheistic women until they believe.
— Quran 2:221
Except Jews and Christians, altough they are both Kafir and Mushriq:
حل لكم ... والمحصنات من الذين أوتوا الكتاب من قبلكم
lawful for you are ... the chaste women from among those who were given the Scripture before you
— Quran 5:5
Blood and unslaughtered dead animals are haram:
حرمت عليكم الميتة والدم ... إلا ما ذكيتم
Prohibited to you are dead animals, blood, ... except what you slaughter
— Quran 5:3
But not blood that does not flow forth, and not fish, although it dies without slaughter:
دما مسفوحا
blood that pours forth
— Quran 6:145
احل لكم صيد البحر
Lawful to you is game from the sea ... [Also see: hadith 1 ; hadith 2 ; hadith 3 ]
— Quran 5:96
Killing a Muslim intentionally is haram:
ومن يقتل مؤمنا متعمدا فجزاؤه جهنم
But whoever kills a believer intentionally - his recompense is Hell
— Quran 4:93
But one can be executed for some crimes in Shariah, and the executioner is blameless:
ولا تقتلوا النفس التي حرم الله إلا بالحق ومن قتل مظلوما فقد جعلنا لوليه سلطانا فلا يسرف في القتل إنه كان منصورا
And do not kill the soul which Allah has forbidden, except by right. And whoever is killed unjustly - We have given his heir authority, but let him not exceed limits in [the matter of] taking life. Indeed, he has been supported [by the law].
—Quran 17:33
The same applies to 2:256. There are exceptions, such as:
فاقتلوا المشركين حيث وجدتموهم ... فإن تابوا وأقاموا الصلاة وآتوا الزكاة فخلوا سبيلهم
Kill the polytheists wherever you find them ... but if they should repent, establish prayer, and give zakah, let them [go] on their way.
— Quran 9:5
وقاتلوهم حتى لا تكون فتنة ويكون الدين كله لله
And fight them until there is no fitnah and [until] the religion, all of it, is for Allah .
— Quran 8:39
تقاتلونهم أو يسلمون
you will fight them until they submit
— Quran 48:16
And among the exceptions is apostasy.
The evidence for apostasy is probably too broad to cover here, but in short:
There are narrations to validate this from several Sahabah through various chains of transmission, including Abu Bakr, Umar, Uthman, Ali, Ayesha, Abdullah ibn Masud, Ibn Abbas, Muadh ibn Jabal, Khalid bin Walid, Abu Musa al-Ash'ari, Jabir ibn Abd Allah etc. Its not an anomalous and singular narration as is sometimes depicted to be.
There is Ijmah (consensus) of the Muslim community on the issue. No orthodox or heterodox group has historically disputed this, except in the recent past. Opposing the view and actions of generations of Muslim caliphs and scholars would be "following other than the way of the believers" [4:115]