The story of the assassination of Ka’b Bin Al-Ashraf is well-documented in both the Biographies as well as in the Hadith, the traditions of Muhammad.

The biography of Ibn Ishaq gives some background information on this assassination on pages 364-369:
After taking power in Medina, Muhammad made military agreements with the Jewish tribes. Those agreements involved provisions to help each other in case one of them was attacked. The problem was that Muhammad started to attack the people from Mecca which the Jewish tribes did not anticipate. After the battle of Badr, a failed robbery on a commercial caravan of the Meccans turned into a full scale war, Ka’b travelled to Medina to give his condolences to the family of an old friend of his who was killed in the battle. This was perceived as Ka’b plotting with the enemy. On his return to Medina he composed amatory verses of an insulting nature about muslim women.

After this, Muhammad gave the order to murder him.

Details about the murder can be found in the Hadith. It is important to note the following:
1. The murder was performed by acquaintances of the victim who had easy access to him.
2. The murder was facilitated by deception of the victim. The deception consisted by talking negatively about Muhammad. This “case” is an example that shows that in Islamic law, it is allowed to lie to further the cause of Islam, even if it involved talking negatively about Muhammad. In this case the lying is sanctioned by Muhammad himself.
3. The killing was extra-judiciary. There was no court-case. The accused was not invited to defend himself.
4. The crime was to mock muslim women and to give his condolences to people whose family members were killed by Muhammad and his followers.

Details can be found in the following Hadith:

Muslim 19.4436 in Chapter 41 : THE MURDER OF KA'B B. ASHRAF, (THE EVIL GENIUS) OF THE JEWS writes:

It has been narrated on the authority of Jabir that the Messenger of Allah  said: Who will kill Ka'b b. Ashraf? He has maligned Allah, the Exalted, and His Messenger. Muhammad b. Maslama said: Messenger of Allah, do you wish that I should kill him? He said: Yes. He said: Permit me to talk (to him in the way I deem fit). He said: Talk (as you like).

So, Muhammad b. Maslama came to Ka'b and talked to him, referred to the old friendship between them and said: This man (i.e. the Holy Prophet) has made up his mind to collect charity (from us) and this has put us to a great hardship. When be heard this, Ka'b said: By God, you will be put to more trouble by him. Muhammad b. Maslama said: No doubt, now we have become his followers and we do not like to forsake him until we see what turn his affairs will take. I want that you should give me a loan. He
said: What will you mortgage? He said: What do you want? He said: Pledge me your women. He said: You are the most handsome of the Arabs; should we pledge our women to you? He said: Pledge me your children. He said: The son of one of us may abuse us saying that he was pledged for two wasqs of dates, but we can pledge you (cur) weapons. He said: All right.

Then Muhammad b. Maslama promised that he would come to him with Harith, Abu 'Abs b. Jabr and Abbad b. Bishr. So they came and called upon him at night. He came down to them. Sufyan says that all the narrators except 'Amr have stated that his wife said: I hear a voice which sounds like the voice of murder. He said: It is only Muhammad b. Maslama and his foster-brother, Abu Na'ila. When a gentleman is called at night even it to be pierced with a spear, he should respond to the call. Muhammad said to his companions: As he comes down, I will extend my hands towards his head and when I hold him fast, you should do your job. So when he came down and he was holding his cloak under his arm, they said to him: We sense from you a very fine smell. He said: Yes, I have with me a mistress who is the most scented of the women of Arabia. He said: Allow me to smell (the scent on your head). He said: Yes, you may smell. So he caught it and smelt. Then he said: Allow me to do so (once again). He then held his head fast and said to his companions: Do your job. And they killed him.

Bukhari 3.45.687:

Narrated Jabir bin ‘Abdullah: Allah’s Apostle said, “Who would kill Ka’b bin Al-Ashraf as he has harmed Allah and His Apostle ?” Muhammad bin Maslama (got up and) said, “I will kill him.” So, Muhammad bin Maslama went to Ka’b and said, “I want a loan of one or two Wasqs of food grains.” Ka’b said, “Mortgage your women to me.” Muhammad bin Maslama said, “How can we mortgage our women, and you are the most handsome among the Arabs?” He said, “Then mortgage your sons to me.” Muhammad said, “How can we mortgage our sons, as the people will abuse them for being mortgaged for one or two Wasqs of food grains? It is shameful for us. But we will mortgage our arms to you.” So, Muhammad bin Maslama promised him that he would come to him next time. They (Muhammad bin Maslama and his companions came to him as promised and murdered him. Then they went to the Prophet and told him about it.

Bukhari 5.59.369:
Narrated Jabir bin ‘Abdullah: Allah’s Apostle 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 Apostle! 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 Kab). “The Prophet said, “You may say it.” Then Muhammad bin Maslama went to Kab 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, Kab 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.) Kab 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 Kab that Muhammad would return to him. He came to Kab at night along with Kab’s foster brother, Abu Na’ila. Kab 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?” Kab 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.” Kab 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.”

We quote from Ibn Ishaq page 364-369 that narrates the story o

Did Muhammad have the murder of this unfortunate man in mind when he said: “I have been made victorious by terror”?

Le Meurtre de Ka’b Bin Al-Ashraf

LA VIOLENCE DANS L'ISLAM : J'ai vaincu par la terreur