Narrated Zaid bin Arqam:
I was with my uncle and I heard `Abdullah bin Ubai bin Salul, saying, "Don't spend on those who are with Allah's Messenger (ﷺ) that they may disperse and go away from him." He also said, "If we return to Medina, surely, the more honorable will expel the meaner." So I informed my uncle of that and then my uncle informed Allah's Messenger (ﷺ) thereof. Allah's Messenger (ﷺ) sent for `Abdullah bin Ubai and his companions. They swore that they did not say anything of that sort Allah's Messenger (ﷺ) deemed their statement true and rejected mine. Thereof I became as distressed as I have never been before, and stayed at home. Then Allah revealed (Surat Al-Munafiqin): 'When the hypocrites come to you.....(63.1) They are the ones who say: Spend nothing on those who are with Allah's Messenger (ﷺ) ..(63.7) Verily the more honorable will expel therefrom the meaner..' (63.7-8) Allah's Messenger (ﷺ) sent for me and recited that Sura for me and said, "Allah has confirmed your statement." 'That is because they believed, then disbelieved, so a seal was set on their hearts, therefore they understand not.' (63.3)
USC-MSA web (English) reference: Vol. 6, Book 60, Hadith 424
Arabic reference: Book 65, Hadith 4901