اِنَّ اللّٰهَ لَا یَغْفِرُ اَنْ یُّشْرَكَ بِهٖ وَ یَغْفِرُ مَا دُوْنَ ذٰلِكَ لِمَنْ یَّشَآءُ وَ مَنْ یُّشْرِكْ بِاللّٰهِ فَقَدِ افْتَرٰۤى اِثْمًا عَظِیْمًا(۴۸)(سورۃ النساء)
Translation
Undoubtedly, Allah does not forgive that anyone be associated with Him as a partner, and He forgives everything lesser than this for whom He wills.¹ And whoever associates a partner with Allah, he fabricates a slander that is a tremendous sin.
(1) That is, Allah Almighty can forgive any sin lesser than shirk (polytheism) whenever He wills, merely out of His grace, even without repentance; but the forgiveness of shirk is not possible without the polytheist sincerely repenting from his shirk, accepting Islam before death, and believing in monotheism (Tawhid). (Asan Tarjumat-ul-Quran)