Abdullah bin Abbas reported,

Some people from among the polytheists had killed many, committed adultery many times, and committed grave sins. They came to Muhammad ﷺ and said, "What you say and call to is indeed beautiful, if only you could tell us that there is some 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 adultery" [Furqan 25:68].And the verse was revealed, "Say, My servants who have transgressed against themselves, do not despair of the mercy of Allah" [Zumar 39:53].

Bukhari 4810

Sahih

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

عن ابن عباس رضي الله عنهما

أن ناسا من أهل الشرك كانوا قد قتلوا وأكثروا وزنوا وأكثروا فأتوا محمدا ﷺ فقالوا إن الذي تقول وتدعو إليه لحسن لو تخبرنا أن لما عملنا كفارة فنزل {والذين لا يدعون مع الله إلها آخر ولا يقتلون النفس التي حرم الله إلا بالحق ولا يزنون} ونزلت {قل يا عبادي الذين أسرفوا على أنفسهم لا تقنطوا من رحمة الله}

البخاري 4810صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Tafsir
Chapter
His saying, "O My servants who have transgressed against themselves, do not despair of the mercy of Allah. Indeed, Allah forgives all sins. Indeed, He is the Forgiving, the Merciful"
Numbering
Darussalam 4810
Bukhari 4810