In the Book of Medicine of his Sahih, Al-Bukhari recorded that `A’ishah said, “The Messenger of Allah was bewitched until he thought that he had relations with his wives, but he had not had relations with them.”
Sufyan said, “This is the worst form of magic when it reaches this stage.”
So the Prophet said,
O `A’ishah! Do you know that Allah has answered me concerning that which I asked Him.
Two men came to me and one of them sat by my head while the other sat by my feet.
The one who was sitting by my head said to the other one, `What is wrong with this man’
The other replied, `He is bewitched.’
The first one said, `Who bewitched him’
The other replied, `Labid bin A`sam. He is a man from the tribe of Banu Zurayq who is an ally of the Jews, and a hypocrite.’
The first one asked, `With what (did he bewitch him)’
The other replied, `With a comb and hair from the comb.’
The first one asked, `Where (is the comb)’
The other answered, `In the dried bark of a male date palm under a rock in a well called Dharwan.’
`A’ishah said, “So he went to the well to remove it (the comb with the hair).
Then he said,
This is the well that I saw. It was as if its water had henna soaked in it and its palm trees were like the heads of devils.
So he removed it (of the well). Then I (`A’ishah) said, `Will you not make this public’
He replied, (Allah has cured me and I hate to spread (the news of) wickedness to any of the people.)”
Source : Tafseer Ibn Kathir , Soorah An-Naas – Dar-us-Salam Publications
How come that the Messenger of Allah was bewitched?
Q 6: How come that the Messenger of Allah (peace be upon him) was bewitched when Allah addresses him saying: Allâh will protect you from mankind. How could he suffer the influence of magic at the time when he was responsible for conveying the Divine Revelation to the Muslims? Kindly explain the statement of the Mushriks (one who associates others with Allah in His Divinity or worship) in the Qur’an: You follow none but a bewitched man. Please, clarify and answer the misconceptions!
A 6: According to an authentic Hadith, this incident of bewitching took place in Al-Madinah. When the Prophet (peace be upon him) started to receive Divine Revelation regularly, proofs of the truthfulness of his prophethood were established and Allah’s victory was granted to him over the disbelievers who felt disgraced. At that time, a man from the Jews called Labid ibn Al-A`sam bewitched him by sticking one of the Prophet’s hairs to a comb. The Prophet (peace be upon him) started imagining that he had done a thing, which in fact he had not done. Despite being affected by magic, the Prophet (peace be upon him) was conscious of every single word he spoke to people. He would speak the words inspired to him by Allah (Exalted be He). However, the spell that was cast on him affected his intimate relation with his wives. `Aishah (may Allah be please with her) said: Once the Prophet was bewitched so that he began to imagine that he had done a thing which in fact he had not done
It was only when Jibril (Gabriel) (peace be upon him) told him about what had happened to him that the Prophet (peace be upon him) sent someone to bring the spell out from a well belonging to one of the Al-Ansar (the Helpers, inhabitants of Madinah who supported the Prophet). When he was rid of it, the spell was broken by Allah’s grace. It was then that Allah (Exalted be He) revealed the two Surahs, which came to be known as Al-Mu`awwidhatayn (Surahs Al-Falaq and Al-Nas). When the Prophet (peace be upon him) recited them, he was cured. Praising these two Surahs, the Prophet (peace be upon him) said: No one can use anything that is equal to these two Surahs in seeking refuge in Allah. The fact that the Prophet (peace be upon him) was bewitched did not affect his conveying of the Islamic Message nor were the people around him affected by that. Allah (Glorified and Exalted be He) protected him from failing to convey the Message of Islam to people.
Like all other prophets, Muhammad (peace be upon him) suffered several types of physical pain. For example, in the battle of Uhud, his face was wounded by the rings of his helmet that pierced his temples, his lower lip bled, and one of his teeth was broken. He also fell into a pit. The disbelievers also tightened a net around him in Makkah. He suffered pain like all the prophets who preceded him. Allah (Exalted be He) raised him to greater ranks and doubled his reward for his patient endurance of suffering and oppression at the hands of the disbelievers. Regarding the Ayah which reads: (Allâh will protect you from mankind…), it means that Allah (Exalted be He) will protect the Prophet (peace be upon him) from the disbelievers’ conspiracy to kill him and from their attempt to prevent him from conveying the Message of Islam.
Source: Fatwas of Ibn Baaz – http://www.alifta.net/Fatawa/FatawaChapters.aspx?languagename=en&View=Page&PageID=1009&PageNo=1&BookID=14
Was the Prophet (صلى الله عليه و سلم) Bewitched? – Shaykh Ibn Utahymeen