Abdullah bin Masud reported,

When the verse "Those who believed and did not mix their belief with wrongdoing" [Anam 6:82] was revealed, it weighed heavily on the Muslims. They said, "Messenger of Allah, which of us does not wrong himself?"He replied, "That is not what it means. It refers only to associating partners with Allah. Have you not heard what Luqman said to his son while admonishing him, 'My son, do not associate anything with Allah. Associating partners with Him is indeed a tremendous wrong'[Luqman 31:13]?"

Bukhari 3429

Sahih

حدثني إسحاق أخبرنا عيسى بن يونس حدثنا الأعمش عن إبراهيم عن علقمة

عن عبد الله رضي الله عنه قال

لما نزلت {الذين آمنوا ولم يلبسوا إيمانهم بظلم} شق ذلك على المسلمين فقالوا يا رسول الله أينا لا يظلم نفسه قال ليس ذلك إنما هو الشرك ألم تسمعوا ما قال لقمان لابنه وهو يعظه {يا بني لا تشرك بالله إن الشرك لظلم عظيم}

البخاري 3429صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Hadiths of the prophets
Chapter
Saying of Allah Most High, "And We had certainly given Luqman wisdom, that he should be grateful to Allah" to His saying, "Indeed, Allah does not like everyone self-deluded and boastful"
Numbering
Darussalam 3429
Bukhari 3429