When the verse "Those who believe and do not mix their faith with wrongdoing" [Anam 6:82] was revealed, it weighed heavily on the people, and they said, "Messenger of Allah, which of us does not wrong himself?"He replied, "It does not mean what you think. Have you not heard what the righteous servant said, 'My son, do not associate anything with Allah. Shirk is truly a great wrong' [Luqman 31:13]? It refers only to shirk."
حدثنا أبو معاوية حدثنا الأعمش عن إبراهيم عن علقمة
لما نزلت هذه الآية {الذين آمنوا ولم يلبسوا إيمانهم بظلم} شق ذلك على الناس وقالوا يا رسول الله فأينا لا يظلم نفسه قال إنه ليس الذي تعنون ألم تسمعوا ما قال العبد الصالح {يا بني لا تشرك بالله إن الشرك لظلم عظيم} إنما هو الشرك
Its isnad is sahih. Ibn Kathir quoted it in his tafsir, 3:351, from this passage. Suyuti attributed it in Durr Manthur, 3:26-27, to Bukhari, Muslim, Tirmidhi, Ibn Jareer, and others.