Disclaimer: I would talk to a different imam -- one who you think has knowledge and is trustworthy in deen -- and get him to sort this out for you. If you want to take things into your own hands (which could impact your health, or something else), read below.
This is something very serious. I would read this thoroughly, do some more research, and step very, very carefully. We will be praying for your success inshaAllah.
Shirk, Magic, Jinns, and Taweez
As mentioned so often, black magic is steeped in shirk, which is the worst sin. Suffice to say that Allah Almightly declares in the Qur'an:
Translation: Indeed, Allah does not forgive shirk (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. (Surah Nisaa, verse 48)
Whether your illness has magic or not is something to consider carefully. Magic is itself shirk, and an affliction of jinns. Note the ayah above; it is absolutely haram to combat magic with magic. You cannot hire magicians to beat up other magicians, or otherwise remove any magic-based affliction, because this is shirk. You must use Qur'anic ruqiyyah.
As to the issue of taweez, this is tricky. There are some companions and scholars who permit it, while most of them do not -- and this is only **with a taweez that has Qur'an in it. A taweez with magic in it is shirk and haram.*
Even those who do permit Qur'anic taweez mention that it's better to leave it, because others may see you wearing it and fall into the shirk taweez.
Applying a Qur'anic Ruqiyyah
The best healing is to seek help from Allah almighty, and also to take whatever medication your doctor thinks you need to do. For Qur'anic methods:
- Make lots of sincere du'a asking Allah to cure you
- Read surah fatiha an odd number of times, and blow onto water. Then drink it.
- Keep adding more fatiha to the water, as well as other select surahs and ayahs (like the three "quls" and ayah al-kursi). Never throw the water, but keep refilling it and stocking up the ruqiyyah on it -- it will increase in power.
- Read fatiha, blow onto your hands, and wipe wherever you feel ill.
Ultimately, the level of your eman determines the effectiveness of the cure. Don't despair, because Allah is with His servents, and he is Ar-Rahman and Ar-Raheem. Ask him by his name, Ash-Shaafee, the one who can cure you a cure with no remnant disease.
What about your Taweez?
My knee-jerk reaction is that it's a shirk taweez. The chance of it being a Qur'anic taweez is unfortunately not too high.
I recommend you go back to the shaykh who gave it to you, and make it clear that you do not wish to commit any shirk. He will agree with you. Mention you only want the taweez if it has Qur'an on it. He will agree with you.
Then I would personally ask him to open it and show you which ayaat he wrote on it.
If he refuses any of these steps, I would conclude that it's probably a shirk taweez. Or if you open it and find strange symbols and numbers (probably jinn language), it's a shirk taweez.
Bottom line: open it, or make him open it, and make sure it's Qur'anic.
Sources:
- Aqeedah 101 (double-weekend course) circa 2006
- Aqeedah 201 (double-weekend course) circa 2007
- Kitab At-Tawheed (from AudioIslam.com)