Hadithcore
Mishkat al-Masabih, 4555

Al-Mughira b. Shu'ba reported the Prophet (ﷺ) as saying:

“He who has himself cauterized or uses a spell has exempted himself from trust in God.” Ahmad, Tirmidhi and Ibn Majah transmitted it.

وَعَنِ الْمُغِيرَةِ بْنِ شُعْبَةَ قَالَ: قَالَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَنْ اكْتَوَى أَوِ اسْتَرْقَى فَقَدْ بَرِئَ مِنَ التَّوَكُّلِ» . رَوَاهُ أَحْمَدُ وَالتِّرْمِذِيّ وَابْن مَاجَه

References1 variant
In-Book Reference
Book 23, Hadith 42