Kab bin Ashraf was the head of the Banu Nadir clan
And he was a man who was highly respected not only by the Jewish tribe but also by the Arab tribe, Kab bin Ashraf was an excellent poet and a rich man, and because of his mastery in writing poetry, Kaab bin Ashraf had a special effect on not only the Jews but also the people of the Arabic tribes
Ibn ishaq writes...
Book the life of Muhmmad page 365
When Muhammad defeated Quresh in the battle of Badr, he sent some people from Badr to Medina to inform about his victory , they told the believers who living in Medina that "Allah has given victory to the prophate Muhammad in Badr. And the following people of idolater were killed, among the people who were killed were some of the most respected people of Arabia at that time, when Kaab bin Ashraf came to know about this, he said, is this news true? did Muhmmad actually kill these mens, these are the nobles of the arabs and kingly men ; by god, if Muhmmad has slain these people "twere better to be dead than alive " when ka'b bin ashraf became certain that the news was true he left the town and went to mecca. He started telling the people of Mecca about the exploits of Muhammad through his poetry, and also started reciting the death poem for the people of Quresh, when Muhammad came to know that Kab bin Ashraf went from Medina to Mecca and do poetry against him.
Sahih Al-Bukhari 4037
Narrated Jabir bin `Abdullah: Allah's Messenger (ﷺ) said, "Who is willing to kill Ka`b bin Al-Ashraf who has hurt Allah and His Apostle?" Thereupon Muhammad bin Maslama got up saying, "O Allah's Messenger (ﷺ)! Would you like that I kill him?" The Prophet (ﷺ) said, "Yes," Muhammad bin Maslama said, "Then allow me to say a (false) thing (i.e. to deceive Ka`b). "The Prophet (ﷺ) said, "You may say it." Then Muhammad bin Maslama went to Ka`b and said, "That man (i.e. Muhammad demands Sadaqa (i.e. Zakat) from us, and he has troubled us, and I have come to borrow something from you." On that, Ka`b said, "By Allah, you will get tired of him!" Muhammad bin Maslama said, "Now as we have followed him, we do not want to leave him unless and until we see how his end is going to be. Now we want you to lend us a camel load or two of food." (Some difference between narrators about a camel load or two.) Ka`b said, "Yes, (I will lend you), but you should mortgage something to me." Muhammad bin Mas-lama and his companion said, "What do you want?" Ka`b replied, "Mortgage your women to me." They said, "How can we mortgage our women to you and you are the most handsome of the 'Arabs?" Ka`b said, "Then mortgage your sons to me." They said, "How can we mortgage our sons to you? Later they would be abused by the people's saying that so-and-so has been mortgaged for a camel load of food. That would cause us great disgrace, but we will mortgage our arms to you." Muhammad bin Maslama and his companion promised Ka`b that Muhammad would return to him. He came to Ka`b at night along with Ka`b's foster brother, Abu Na'ila. Ka`b invited them to come into his fort, and then he went down to them. His wife asked him, "Where are you going at this time?" Ka`b replied, "None but Muhammad bin Maslama and my (foster) brother Abu Na'ila have come." His wife said, "I hear a voice as if dropping blood is from him, Ka`b said. "They are none but my brother Muhammad bin Maslama and my foster brother Abu Naila. A generous man should respond to a call at night even if invited to be killed." Muhammad bin Maslama went with two men. (Some narrators mention the men as 'Abu bin Jabr. Al Harith bin Aus and `Abbad bin Bishr). So Muhammad bin Maslama went in together with two men, and sail to them, "When Ka`b comes, I will touch his hair and smell it, and when you see that I have got hold of his head, strip him. I will let you smell his head." Ka`b bin Al-Ashraf came down to them wrapped in his clothes, and diffusing perfume. Muhammad bin Maslama said. " have never smelt a better scent than this. Ka`b replied. "I have got the best 'Arab women who know how to use the high class of perfume." Muhammad bin Maslama requested Ka`b "Will you allow me to smell your head?" Ka`b said, "Yes." Muhammad smelt it and made his companions smell it as well. Then he requested Ka`b again, "Will you let me (smell your head)?" Ka`b said, "Yes." When Muhammad got a strong hold of him, he said (to his companions), "Get at him!" So they killed him and went to the Prophet (ﷺ) and informed him. (Abu Rafi`) was killed after Ka`b bin Al-Ashraf."
Sahih al-Bukhari 4037
Chapter 15: The killing of Ka'b bin Al-Ashraf
Book 64: Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi)
Ishaq writes..., Muselma said that the killing of Ka'ab bin Ashraf instilled so much fear in the hearts of the Jews that there was not a single Jew who did not have the fear of death in his heart, after this incident, "All the Jews are in their hearts." were scared for their lives".
Book : The Life Of Muhmmad Page 368
some believers claim that, since Kab bin Ashraf was doing poetry against Muhammad, so he was killed, so my question is, if he was really a prophet of God, why he didn't do this work by his kun fay kun? When we say that a person is the prophet of God, it means that his character will be so good & great that everyone should follow him. a person who did not have enough patience that if someone write poetry against him, who ordered to kill them, far from being a ideal person, He can never ever be called as a good person, Jesus or Lord Buddha was also opposed by many people of there time period, but they did not kill anyone, they never order to kill anyone, On the contrary, they give the message of love to the society till there last breath.
The second aspect from this is.. because of the Muslims are following that person, the "current circumstances" can be understood by this, why riots were instigated in Sweden when the quran was burnt? which resulted is "the loss of many lives and Damage of public and private property". It also shows the hypocrisy of Muslims, because on the one hand Muslims (like Munawar Farooqui & others) openly make fun of other religions, humiliating them in public places and on the other hand when someone does this same, they immediately become aggressive. (Charlie Hebdo, Sweden riots, murders on the name of blasphemy in countries like Pakistan, etc.).
I have given this example only so that my Muslim brother understands the truth, and can free themselves from the web of hatred.