Abdullah bin Abbas reported,

Some people from among the polytheists had committed many murders and engaged in much fornication. They came to Muhammad ﷺ and said, "What you are saying and calling us to is indeed good, if only you could tell us that there is an atonement for what we have done."So the verse was revealed, "And those who do not invoke another god alongside Allah, nor kill the soul which Allah has forbidden except by right, nor commit fornication" [Furqan 25:68], and there was also revealed, "Say, My servants who have transgressed against themselves, do not despair of the mercy of Allah" [Zumar 39:53].

Azami 173

Sahih

عن ابن عباس

أن ناسا من أهل الشرك كانوا قد قتلوا وأكثروا، وزنوا وأكثروا فأتوا محمدا ﷺ فقالوا: إن الذي تقول وتدعو إليه لحسن لو تخبرنا أن لما عملنا كفارة، فنزلت {والذين لا يدعون مع الله إلها آخر ولا يقتلون النفس التي حرم الله إلا بالحق ولا يزنون} [الفرقان: ٦٨]، ونزل {قل يعبادي الذين أسرفوا على أنفسهم لا تقنطوا من رحمة الله} [الزمر: ٥٣].

الأعظمي 173صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Qualities of faith
Section
Islam destroying what came before it
Numbering
Jami al-Kamil 173 (2nd edition)
Azami 173