It is narrated from Sayyiduna Zayd bin Arqam (may Allah be pleased with him): "A Jewish man cast a spell of sorcery on the Prophet (peace and blessings be upon him), because of which he (peace and blessings be upon him) remained ill for several days. Then Jibril (peace be upon him) came to him (peace and blessings be upon him) and said that a Jewish man had cast sorcery on him and tied some knots for him. So the Messenger of Allah (peace and blessings be upon him) sent Sayyiduna Ali (may Allah be pleased with him), who searched for those knots, took them out and brought them. Then whenever a knot was untied, he (peace and blessings be upon him) felt lighter, until the Prophet (peace and blessings be upon him) stood up refreshed, as if an animal had been released from its tether. Then the Prophet (peace and blessings be upon him) never mentioned this matter to that Jew, nor did he ever let any sign of displeasure about him appear on his blessed face."
The narration of Imam Ahmad bin Mani' has these words: "Jibril (peace be upon him) said that a Jew had tied knots for him (peace and blessings be upon him) and had hidden them in such-and-such a well, so he (peace and blessings be upon him) should send someone to bring them out. So he (peace and blessings be upon him) sent Sayyiduna Ali (may Allah be pleased with him), who recovered it from the well, and when the Messenger of Allah (peace and blessings be upon him) untied those knots, he (peace and blessings be upon him) became well, as if he had been freed from a bond. He (peace and blessings be upon him) neither showed this before that Jew nor informed him of it."
Likewise, in the narration of Imam Abu Ya'la al-Mawsili it is narrated: "A man used to come to the Prophet (peace and blessings be upon him). He tied knots of sorcery for him (peace and blessings be upon him) and threw them into the well of a man from the Ansar. Then two angels came to him (peace and blessings be upon him) to visit him in his illness; one of them sat at his head and the other at his feet. One asked the other: 'Do you know what ails him?' He replied: 'The man who used to visit him has bewitched him and thrown it into a well.' So he (peace and blessings be upon him) sent a man who took out those knots, and he saw that the water of the well had turned yellow (from the effect of the sorcery). Then when those knots were untied, he (peace and blessings be upon him) was completely cured. After this incident that man continued to come to the Prophet (peace and blessings be upon him), but he (peace and blessings be upon him) never mentioned it to him, nor ever reproached him for it."
Imam al-Nasa'i also recorded this narration in his book al-Kubra.