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:7:175

And recite to them, ˹O Muhammad˺, the news of him to whom we gave ˹knowledge of˺ Our signs, but he detached himself from them; so Satan pursued him, and he became of the deviators.  

And recite, O Muhammad (s), to them, that is, the Jews, the tidings, the tale, of him to whom We gave Our signs, but he cast them off, emerging in his disbelief in the same way that a snake emerges from its ˹shed˺ skin, he rebelled in disbelief, this was Bal‘am b. Bā‘ūrā’, a scholar from among the Children of Israel, who had been given some knowledge ˹of the Scriptures˺, and who was asked ˹by them˺ to invoke God against Moses. And when he did, the invocation turned against him and his tongue fell out onto his chest, and Satan pursued him, catching up with him and so he became his comrade, and he became of the perverse.
القرآن:٧:١٧٥

وَاتْلُ عَلَيْهِمْ نَبَأَ الَّذِي آتَيْنَاهُ آيَاتِنَا فَانْسَلَخَ مِنْهَا فَأَتْبَعَهُ الشَّيْطَانُ فَكَانَ مِنَ الْغَاوِينَ  

{واتل} يا محمد {عليهم} أي اليهود {نبأ} خبر {الذي آتيناه آياتنا فانسلخ منها} خرج بكفره كما تخرج الحية من جلدها، وهو بلعم بن باعوراء من علماء بني إسرائيل، سُئل أن يدعو على موسى وأُهدي إليه شيء، فدعا فانقلب عليه اندلع لسانه على صدره {فأتبعه الشيطان} فأدركه فصار قرينه {فكان من الغاوين}.

See similar narrations below:

Collected by Aḥmad's Zuhd
ahmad-zuhd:1874ʿAbdullāh > ʿAlī > Sayyār > Jaʿfar > Mālik

[Machine] "So Allah sent down the verse: 'And recite to them the story of him to whom we gave our signs, but he detached himself from them' [Surah Al-A'raf 7:175].  

الزهد لأحمد:١٨٧٤حَدَّثَنَا عَبْدُ اللَّهِ حَدَّثَنَا عَلِيٌّ حَدَّثَنَا سَيَّارٌ حَدَّثَنَا جَعْفَرٌ حَدَّثَنَا مَالِكٌ قَالَ بَعَثَ مُوسَى نَبِيُّ اللَّهِ ﷺ بِلْعَامَ بْنَ بَاعَوْرَاءَ إِلَى مَلِكِ مَدْيَنَ يَدْعُوهُمْ إِلَى اللَّهِ ﷻ وَكَانَ مُجَابَ الدَّعْوَةِ وَكَانَ مِنْ عُلَمَاءِ بَنِي إِسْرَائِيلَ وَكَانَ مُوسَى عَلَيْهِ السَّلَامُ يُقَدِّمُهُ فِي الشَّدَائِدِ إِذَا نَزَلَتْ بِهِ يَدْعُو وَيُؤَمِّنُ مُوسَى عَلَيْهِ السَّلَامُ قَالَ فَأَقْطَعَهُ وَأَعْطَاهُ وَأَقْطَعَهُ وَأَعْطَاهُ فَتَرَكَ دِينَهُ وَتَبِعَ دِينَهُ قَالَ

فَأَنْزَلَ اللَّهُ ﷻ {وَاتْلُ عَلَيْهِمْ نَبَأَ الَّذِي آتَيْنَاهُ آيَاتِنَا فَانْسَلَخَ مِنْهَا} [الأعراف 175] الْآيَةَ