Why was Banu Qaynuqaa' expelled from Madeenah?
All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu 'alayhi wa sallam, is His slave and Messenger.
The reason for which the Jews of Banu Qaynuqaa’ were expelled from Madeenah was detailed in the book entitled Imtaa’ Al-Asmaa’, authored by Taqiyy-ud-Deen Al-Maqreezi, as he wrote:
“The Battle of Banu Qaynuqaa’ and their expulsion:
Then the Banu Qaynuqaa’ – who were one of the Jewish sects in Madeenah – were expelled in (the month of) Shawwaal after the Battle of Badr, and it was said: in the month of Safar in the third year of Hijrah. The reason was that when the Prophet, sallallahu 'alayhi wa sallam, came to Madeenah as a migrant, all the Jews concluded a treaty with him, and he wrote the terms and conditions of this treaty between him and them, and he annexed every people with their allies, and he put guarantees between him and them, and he stipulated some conditions on them, including that they do not support any enemy against him.
But when the Prophet, sallallahu 'alayhi wa sallam, came back from the Battle of Badr, the Jews transgressed and violated the covenant that was between him and them, so he, sallallahu 'alayhi wa sallam, gathered them in the market of Banu Qaynuqaa’ and said to them, ‘O Jews, embrace Islam before Allah inflicts upon you what He had inflicted upon Quraysh [i.e. defeat, as they were defeated in the Battle of Badr]. I swear by Allah that you, indeed, know that I am the Messenger of Allah.’ They said, ‘O Muhammad, do not dare to confront us, as you defeated people who were ignorant and unexperienced; whereas, by Allah, we are people of war, and if you were to fight against us, you will discover how strong we are and realise that you never fought against people like us.’
The reason for their expulsion:
While they continued to show enmity and violated the covenant, the wife of one of the Ansaar went to the market of Banu Qaynuqaa’ and sat down waiting at the jeweler for her jewelry. A man from Banu Qaynuqaa’ came from behind her and untied her clothes with a fork without her noticing. When she stood up, her ‘Awrah (i.e. part of her body) was exposed, and they laughed at her and mocked her. So a Muslim man followed him and killed him. Then the Jews of Banu Qaynuqaa’ gathered on him and killed him, and they renounced the Covenant with the Prophet, sallallahu 'alayhi wa sallam, and fought against him, and stationed themselves inside their fortress. So the Prophet, sallallahu 'alayhi wa sallam, marched to them while they were allies of ‘Abdullah ibn Ubayy ibn Salool, and they were the most courageous Jews, the first to betray. The Prophet, sallallahu 'alayhi wa sallam, laid siege to their fortress for fifteen nights until they agreed to accept his ruling, so he ordered them to be tied up, then he released them by the intercession of ‘Abdullah ibn Ubay ibn Salool, and ordered them to be expelled out of Madeenah, and Muhammad ibn Maslamah drove them out.”
Allah knows best.