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.
ibnmajah:2536Abū Bakr b. Abū Shaybah > Abū Usāmah > Bahz b. Ḥakīm from his father from his grandfather

“Allah (SWT) will not accept any good deed from a polytheist who committed polytheism after having become Muslim, until he leaves the polytheists and joins the Muslims.”  

ابن ماجة:٢٥٣٦حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ حَدَّثَنَا أَبُو أُسَامَةَ عَنْ بَهْزِ بْنِ حَكِيمٍ عَنْ أَبِيهِ عَنْ جَدِّهِ قَالَ

قَالَ رَسُولُ اللَّهِ ﷺ لاَ يَقْبَلُ اللَّهُ مِنْ مُشْرِكٍ أَشْرَكَ بَعْدَ مَا أَسْلَمَ عَمَلاً حَتَّى يُفَارِقَ الْمُشْرِكِينَ إِلَى الْمُسْلِمِينَ  


See similar narrations below:

Collected by Suyūṭī
suyuti:26408a
Request/Fix translation

  

السيوطي:٢٦٤٠٨a

"لا يَقْبَلُ اللهُ -تَعَالى- منْ مُشْرِكٍ أشْرَكَ بَعْدَ مَا أسْلَمَ عَمَلًا حَتَّى يُفَارِقَ المُشرِكِينَ إلى المسْلِمِينَ".  

[هـ] ابن ماجة عن بهز بن حكيم عن أبيه عن جده