الآية رقم (18) - وَمَنْ أَظْلَمُ مِمَّنِ افْتَرَى عَلَى اللّهِ كَذِبًا أُوْلَـئِكَ يُعْرَضُونَ عَلَى رَبِّهِمْ وَيَقُولُ الأَشْهَادُ هَـؤُلاء الَّذِينَ كَذَبُواْ عَلَى رَبِّهِمْ أَلاَ لَعْنَةُ اللّهِ عَلَى الظَّالِمِينَ

(18) - And who is more unjust than he who invents a lie about Allah? Those will be presented before their Lord, and the witnesses will say, "These are the ones who lied against their Lord." Unquestionably, the curse of Allah is upon the wrongdoers

(وَمَنْ أَظْلَمُ مِمَّنِ افْتَرَىٰ عَلَى اللَّهِ كَذِبًا) (And who is more unjust than he who invents a lie about Allah?): This verse begins with a confirmed statement in a form of rhetorical question. The question precedes their acknowledging confession against themselves, which repreents the best proof.

(أُولَٰئِكَ يُعْرَضُونَ عَلَىٰ رَبِّهِمْ) (Those will be presented before their Lord): Presentation denotes uncover the hidden thing. So that, the shame, and humiliation will appear on those who have invented lies about Allah (swt).

( وَيَقُولُ الْأَشْهَادُ هَٰؤُلَاءِ الَّذِينَ كَذَبُوا عَلَىٰ رَبِّهِمْ) (and the witnesses will say, “These are the ones who lied against their Lord“): Among the witnesses there are angels, because Allah (swt) says:

 مَّا يَلْفِظُ مِن قَوْلٍ إِلَّا لَدَيْهِ رَقِيبٌ عَتِيدٌ

(Man does not utter any word except that with him is an observer prepared [to record].) (Qaaf :18)

And He (swt) says:

 وَإِنَّ عَلَيْكُمْ لَحَافِظِينَ (10) كِرَامًا كَاتِبِينَ (11) يَعْلَمُونَ مَا تَفْعَلُونَ

(And indeed, [appointed] over you are keepers, (10) Noble and recording; (11) They know whatever you do (12)) (Al-Infitaar)

Furthermore, there are witnesses from the prophets who conveyed to them the Guidance of Allah, because Allah (swt) says

فَكَيْفَ إِذَا جِئْنَا مِن كُلِّ أُمَّةٍ بِشَهِيدٍ وَجِئْنَا بِكَ عَلَىٰ هَٰؤُلَاءِ شَهِيدًا

(So how [will it be] when We bring from every nation a witness and we bring you, [O Muhammad] against these [people] as a witness? ) (An-Nisaa:41)

Also, the witness against these is the Muslim believer from the nation of the Prophet Muhammad (saws) as Allah (swt) says:

 وَكَذَٰلِكَ جَعَلْنَاكُمْ أُمَّةً وَسَطًا لِّتَكُونُوا شُهَدَاءَ عَلَى النَّاسِ وَيَكُونَ الرَّسُولُ عَلَيْكُمْ شَهِيدًا

(And thus we have made you a just community that you will be witnesses over the people and the Messenger will be a witness over you) (Al-Baqara:143)

Bearing witness means that everything they had done is recorded, It is recorded against them that they received the Message, but they denied and rebelled against it. So they committed the crime that entails punishment, because punishment is only due to a crime, and there is no criminalization except on the basis of an existing promulgated legislative provision.  As they had lied about Allah (swt) and committed the abominable sin, which is polytheism, atheism, and denial of the Messenger (saws) and his message, no doubt, Allah (swt) will expel them from His mercy.