Sahih Muslim , Book 31, Hadith 5935 (USC-MSA) ⓘ
Sa'd reported: This verse was revealed in relation to six persons and I and Ibn Mas'ud were amongst them. The polytheists said to him (the Holy Prophet): Do not keep such persons near you. It was upon this that (this verse was revealed):" Drive not away those who call upon their Lord morning and evening desiring only His pleasure" (vi. 52).
حَدَّثَنَا زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا عَبْدُ الرَّحْمَنِ، عَنْ سُفْيَانَ، عَنِ الْمِقْدَامِ بْنِ شُرَيْحٍ، عَنْ أَبِيهِ، عَنْ سَعْدٍ، فِيَّ نَزَلَتْ { وَلاَ تَطْرُدِ الَّذِينَ يَدْعُونَ رَبَّهُمْ بِالْغَدَاةِ وَالْعَشِيِّ} قَالَ نَزَلَتْ فِي سِتَّةٍ أَنَا وَابْنُ مَسْعُودٍ مِنْهُمْ وَكَانَ الْمُشْرِكُونَ قَالُوا لَهُ تُدْنِي هَؤُلاَءِ .
also referenced under: Book 44, Hadith 70 (In-Book) & Hadith 2413 (Reference)