It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that he said: "A woman of the Ansar whose children did not survive would make a vow that if a child of hers lived, she would surely make him a Jew. Then, when Banu al-Nadir were exiled, the Ansar said: 'What shall we do with our sons?' So this verse was revealed: 'There is no compulsion in religion.'"
Imam Abu Dawud (may Allah have mercy on him) narrated it through Muhammad bin Umar al-Muqaddami from Ash'ath bin Abdullah.
Also, both Imam Abu Dawud (may Allah have mercy on him) and Imam al-Nasa'i (may Allah have mercy on him) narrated it from Muhammad bin Bashshar, from Ibn Abi Adi, from Shu'bah.
And Imam al-Nasa'i (may Allah have mercy on him) narrated it from al-Hasan bin Ali, from Wahb bin Jarir.
And also from Ibrahim bin Yunus bin Muhammad, from Uthman bin Umar, from Shu'bah, similar in meaning.
And Imam Abu Hatim al-Busti (may Allah have mercy on him) narrated it in Bust from Ishaq bin Ibrahim, from al-Hasan bin Ali al-Hulwani, from Wahb bin Jarir, similar in meaning.