When the Muslims fled persecution from Makkah to Madinah, they made treaties with the Banu qaynuqa, Banu Nadir, and other tribes. It was stipulated that they would not help any enemy against the Muslims.
To recap, in previous years, the Banu Qaynuqa were expelled due to waging war against the Muslims and giving the Quraysh military supplies.
The Banu Nadir on the other hand, gave over information to the Quraysh on the weak spots of the Muslims, at the battle of Uhud. So as to give the Quraysh advantage over the Muslims. And they further, also tried assassinating the Prophet (p). With these treacheries committed by them, the Prophet (p) expelled them.
With them getting expelled, some among Banu Qaynuqa and many of the Banu Nadir’s leaders settled in Khaybar. Having the enmity and hatred towards the Muslims, they hatched up plots, and incited other tribes in Arabia to attack the Muslims. Let me just highlight few instances before, where they attacked and killed Muslims, while they were in Khaybar:
2. They made the Banu Qurayzah break their pact, and made them side with enemies in attacking the Muslims.
3. Al-Yusayr Ibn Rizam, one of their leaders gathered Banu Ghatafan to attack the Muslims.
We see from the above, that these people were not a peaceful lot. Instead of moving to Khaybar for peace, and get on with life, they used Khaybar as a military headquarters to attack and kill Muslims.
When the Jews of Khaybar hired soldiers from banu Ghatafan to attack Madinah, this was the last straw, and as result a decision was made by Prophet Muhammed to engage the enemy on their land, and put a stop to their attacks once and for all.
Dr. Shawqi Abu Khalil:
“The Jews of Khaibar contacted the people of the Ghatafan tribe, who were known to be mercenaries for hire. As a reward for fighting the Muslims, the Jews of Khaibar offered them a percentage of their yearly harvest, which consisted mainly of fruits and dates.
They furthermore established alliances with the tribes of Fadak, Taima and Wadi Al-Qura; together, they were to launch a surprise attack on Al-Madinah. Having been informed of their plans, the Muslims who witnessed Al-Hudaibiyah travelled to Khaibar, in order to bring an end to the plotting of its inhabitants and their allies.” 
Shaykh Allamah Shibli Nomani:
“The Prophet (p) had a wish to come to an agreement with these people, and with this end in view, he had sent Abdullah Ibn Rawaha. … having received this message the Jews sent Kinana and Hawdha Ibn Qais to the Ghatafan asking them to join them in the attack on Medina and promising to them half of the yield of the oasis. The Ghatafan according to a report, accepted these terms.
The Banu Fazara, an offshoot of the Ghatafan were very powerful. Hearing that the Jews of Khaibar were preparing for an attack against the Holy Prophet (p), they came to Khaibar and offered to fight the Muslims along with them.” 
This is also reported briefly in Sahih Muslim, when the Prophet (p) and his companions came back from Makkah, after the treaty of Hudaybiyah, the Banu Ghatafan who were allies of the Jews of Khaybar, raided Madinah, robbed and murdered an innocent man. Shortly after this incident, the Prophet (p) set out to Khaybar. Sahih Muslim:
“… When the day dawned, ABD AL-RAHMAN AL-FAZARI MADE A RAID AND DROVE AWAY ALL THE CAMELS OF THE MESSENGER OF ALLAH, AND KILLED THE MAN WHO LOOKED AFTER THEM. I said: Rabah, ride this horse, take it to Talha b. ‘Ubaidullah and Inform the Messenger of Allah that the polytheists have made away with his camels.
Then I stood upon a hillock and turning my face to Medina, shouted thrice: Come to our help I Then I set out in pursuit of the raiders, shooting at them with arrows and chanting a (self-eulogatory) verse in the Iambic metre: I am the son of al-Akwa’ And today is the day of defeat for the mean.
I would overtake a man from them, shoot at him an arrow which, piercing through the saddle, would reach his shoulder. and I would say: Take it, chanting at the same time the verse And I am the son of al-Akwa’ And tody is the day of defeat for the mean. By God, I continued shooting at them and hamstringing their animals.
Whenever a horseman turned upon me, I would come to a tree and (hid myself) sitting at its base. Then I would shoot at him and hamstring his horse. (At last) they entered a narrow mountain gorge. I ascended that mountain and held them at bay throwing stones at them. I continued to chase them in this way until I got all the camels of the Messenger of Allah released and no camel was left with them. They left me; then I followed them shooting at them (continually) until they dropped more than thirty mantles and thirty lances.
lightening their burden. On everything they dropped, I put a mark with the help of (a piece of) stone so that the Messenger of Allah and his Companions might recognise them (that it was booty left by the enemy). (They went on) until They came to a narrow valley when so and so, son of Badr al-Fazari joined them. They (now) sat down to take their breakfast and I sat on the top of a tapering rock. Al-Fazari said:
Who is that fellow I am seeing? They said: This fellow has harassed us. By God, he has not left us since dusk and has been (continually) shooting at us until he has snatched everything from our hands. He said: Four of you should make a dash at him (and kill him). (Accordingly), four of them ascended the mountain coming towards me. When it became possible for me to talk to them, I said: Do you recognise me? They said: No. Who are thou?
I said: I am Salama, son of al-Akwa’. By the Being Who has honoured the countenance of Muhammad I can kill any of you I like but none of you will be able to kill me. One of them said: I think (he is right). So they returned. I did not move from my place until I saw the horsemen of the Messenger of Allah, who came riding through the trees. Lo! the foremost among them was Akhram al-Asadi.
Behind him was Abu Qatada al-Ansari and behind him was al-Miqdad b. al-Aswad al-Kindi. I caught hold of the rein of Akhram’s horse (Seeing this). they (the raiders) fled. I said (to Akhram): Akhram, guard yourself against them until Allah’s Messenger and his Companions join you. He said: )
Salama, if you believe In Allah and the Day of Judgment and (if) you kaow that Paradise is a reality and Hell is a reality, you should not stand between me and martyrdom. so I let him go. Akhram and Abd al-Rahman (Fazari) met in combat. Akhram hamstrung Abd al-Rahman’s horse and the latter struck him with his lance and killed him.
Abd al-Rabman turned about riding Akhram’s horse. Abu Qatada, a horse-man of the Messenger of Allah, met ‘Abd al-Rahman (in combat), smote him with his lance and killed him.
By the Being Who honoured the countenance of Muhammad (may peace oe upon him), I followed them running on my feet (so fast) that I couldn’t see behind me the Companions of Muhammad, nor any dust raised by their horses. (I followed them) until before sunset they reached a valley which had a spring of water, which was called Dhu Qarad, so that they could have a drink, for they were thirsty. They saw me running towards them.
I turned them out of the valley before they could drink a drop of its water. They left the valley and ran down a slope.
I ran (behind them), overtook a man from them, shot him with an arrow through the shoulder blade and said: Take this. I am the son of al-Akwa’; and today is the day of annihilation for the people who are mean. The fellow (who was wounded) said: May his mother weep over him! Are you the Akwa’ who has been chasing us since morning?
I said: Yes, O enemy of thyself, the same Akwa’. They left two horses dead tired on the hillock and I came dragging them along to the Messenger of Allah. I met ‘Amir who had with him a container having milk diluted with water and a container having water. I performed ablution with the water and drank the milk. Then I came to the Messenger of Allah while he was at (the spring of) water from which I had driven them away.
The Messenger of Allah had captured those camels and everything else I had captured and all the lances and mantles I had snatched from the polytheists and Bilal had slaughtered a she-camel from the camels I had seized from the people, and was roasting its liver and hump for the Messenger of Allah.
I said: Messenger of Allah, let me select from our people one hundred men and I will follow the marauders and I will finish them all so that nobody is left to convey the news (of their destruction to their people).
(At these words of mine), the Messenger of Allah laughed so much that his molar teeth could be seen in the light of the fire, and he said: Salama, do you think you can do this? I said: Yes, by the Being Who has honoured you. He said: Now they have reached the land of Ghatafan where they are being feted. (At this time) a man from the Ghatafan came along and said: So and so slaughtered a camel for them.
When they were exposing its skin, they saw dust (being raised far off). They said: They (Akwa’ and his companions) have come. So. they went away fleeing. …
When it was morning, the Messenger of Allah said: Our best horseman today is Abu Qatada and our best footman today is Salama. Then he gave me two shares of the booty-the share meant for the horseman and the share meant for the footman, and combined both of them for me. Intending to return to Medina, he made me mount behind him on his she-camel named al-Adba’.
While we were travelling, a man from the Ansar who could not be beaten in a race said: Is there anyone who could compete (with me) in race to Medina? Is there any competitor? He continued repeating this. When I heard his talk, I said: Don’t you show consideration to a dignified person and don’t you have awe for a noble man? He said: No, unless he be the Messenger of Allah.
I said: Messenger of Allah, may my father and mother be thy ransom, let me get down so that I may beat this man (in the race). He said: It you wish, (you may). I said (to the man): I am coming to thee, I then turned my feet. sprang up and tan and gasped (for a while) when one or two elevated places were left and again followed his heel and again gasped
(for a while) when one or two elevated places were left and again dashed until I joined him and gave a blow between his shoulders. I said: You have been overtaken, by God. He said: I think so.
Thus, I reached Medina ahead of him. By God, WE HAD STAYED THERE ONLY THREE NIGHTS WHEN WE SET OUT TO KHAIBAR with the Messenger of Allah. (On the way) my uncle, Amir, began to recite the following rajaz verses for the people: By God, if Thou hadst not guided us aright, We would have neither practised charity nor offered prayers. (O God! ) We cannot do without Thy favours; Keep us steadfast WHEN WE ENCOUNTER THE ENEMY, And descend tranquillity upon us.
The Messenger of Allah said: Who is this? ‘Amir said: it is ‘Amir. He said: May thy God forgive thee! The narrator said: Whenever the Messenger of Allah asked forgiveness for a particular person, he was sure to embrace martyrdom. Umar b. Khattab who was riding on his camel called out: Prophet of Allah, I wish you had allowed us to benefit from Amir. Salama continued:
When we reached Khaibar, its king named Marhab advanced brandishing his sword and chanting: Khaibar knows that I am Marhab (who behaves like) A fully armed, and well-tried warrior. When the war comes spreading its flames. My uncle, Amir, came out to combat with him, saying: Khaibar certainly knows that I am ‘Amir, A fully armed veteran who plunges into battles.
They exchanged blows. Marbab’s sword struck the shield of ‘Amir who bent forward to attack his opponent from below, but his sword recoiled upon him and cut the main artery: in his forearm which caused his death. Salama said: I came out and heard some people among the Companions of the Prophet saying: Amir’s deed has been wasted; he has killed himself. So I came to the Prophet weeping and I said:
Messenger of Allah. Amir’s deed has been wasted. The Messenger said: Who passed this remark? I said: Some of your Companions. He said: He who has passed that remark has told a lie, for ‘Amir there is a double reward. Then he sent me to ‘Ali who had sore eyes, and said:
I will give the banner to a man who loves Allah and His Messenger or whom Allah and His Messenger love. So I went to ‘Ali, brought him beading him along and he had sore eyes, and I took him to the Messenger of Allah, who applied his saliva to his eyes and he got well.
The Messenger of Allah gave him the banner (and ‘Ali went to meet Marhab in a single combat). The latter advanced chanting: Khaibar knows certainly that I am Marhab, A fully armed and well-tried valorous warrior (hero) When war comes spreading its flames. ‘Ali chanted in reply: I am the one whose mother named him Haidar, (And am) like a lion of the forest with a terror-striking countenance.
I give my opponents the measure of sandara in exchange for sa’ (i. e. return thir attack with one that is much more fierce). The narrator said: ‘Ali struck at the head of Mirhab and killed him, so the victory (capture of Khaibar) was due to him. This long tradition has also been handed down Through a different chain of transmitters. (Sahih Muslim Book 19, Hadith 4450)
Although the above report does not specifically say that they were involved, the narration does hint to us that they were guilty of the attack on Madinah, in which an innocent man was murdered and many lives-stock was robbed. Furthermore, the report also tells us when they got to Khaybar, Marhab the King came out fully armed and ready to engage.
This incident also highlights the fact that the individuals in Khaybar were not innocent. Shortly afterwards, a battle ensued. At the end, the hostile enemy agreed to surrender. The Prophet (p) signed a peace treaty with them on account that they keep the peace, not harm the Muslims. They agreed and were allowed to stay.
 Atlas of the Qur’an – Places. Nations. Landmarks. By Dr. Shawqi Abu Khalil, Page 307 – 308
 Sirat -un- Nabi [Sallallahu Alaihi Wasallam] By Shaykh Allamah Shibli Nomani (r.a) – volume 2, page 156 – 159