Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:4:48

Indeed, Allah does not forgive association with Him, but He forgives what is less than that for whom He wills. And he who associates others with Allah has certainly fabricated a tremendous sin.  

God forgives not that anything should be associated with Him. But He forgives other than, save, that, of sins, to whomever He wills, forgiveness for, by admitting him into Paradise without punishment. And whomever He wills of the believers He punishes for their sins, and then admits them into Paradise. Whoever associates anything with God, then he has indeed invented a tremendous, a great, sin.
القرآن:٤:٤٨

إِنَّ اللَّهَ لَا يَغْفِرُ أَنْ يُشْرَكَ بِهِ وَيَغْفِرُ مَا دُونَ ذَٰلِكَ لِمَنْ يَشَاءُ ۚ وَمَنْ يُشْرِكْ بِاللَّهِ فَقَدِ افْتَرَىٰ إِثْمًا عَظِيمًا  

{إن الله لا يغفر أن يُشرك} أي الإشراك {به ويغفر ما دون} سوى {ذلك} من الذنوب {لمن يشاء} المغفرة له بأن يدخله الجنة بلا عذاب ومن شاء عذّبه من المؤمنين بذنوبه ثم يدخله الجنة {ومن يشرك بالله فقد افترى إثما} ذنبا {عظيما} كبيرا.

See similar narrations below:

Collected by Qurʾān
quran:4:116

Indeed, Allah does not forgive association with Him, but He forgives what is less than that for whom He wills. And he who associates others with Allah has certainly gone far astray.  

God does not forgive that anything should be associated with Him; He forgives all except that, to whomever He will. Whoever associates anything with God, verily he has strayed far away, from the truth.
القرآن:٤:١١٦

إِنَّ اللَّهَ لَا يَغْفِرُ أَنْ يُشْرَكَ بِهِ وَيَغْفِرُ مَا دُونَ ذَٰلِكَ لِمَنْ يَشَاءُ ۚ وَمَنْ يُشْرِكْ بِاللَّهِ فَقَدْ ضَلَّ ضَلَالًا بَعِيدًا  

{إن الله لا يغفر أن يُشرك به ويغفر مادون ذلك لمن يشاء ومن يشرك بالله فقد ضل ضلالا بعيدا} عن الحق.