Sunan an-Nasa'i, Hadith 5027 ⓘ
Abu Hurairah narrated that: The Messenger of Allah [SAW] said: "Whoever stands (in the voluntary night prayer of) Ramadan out of faith and in the hope of reward, his previous sins will be forgiven. And whoever spends the night of Lailat Al-Qadr in prayer out of faith and in the hope of reward, his previous sins will be forgiven."
حَدَّثَنَا أَبُو الْأَشْعَثِ قَالَ حَدَّثَنَا خَالِدٌ يَعْنِي ابْنَ الْحَارِثِ قَالَ حَدَّثَنَا هِشَامٌ عَنْ يَحْيَى بْنِ أَبِي كَثِيرٍ عَنْ أَبِي سَلَمَةَ بْنِ عَبْدِ الرَّحْمَنِ قَالَ حَدَّثَنِي أَبُو هُرَيْرَةَ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ مَنْ قَامَ رَمَضَانَ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ وَمَنْ قَامَ لَيْلَةَ الْقَدْرِ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ
also referenced under: Book 47, Hadith 43 (In-Book) & Volume 6, Book 47, Hadith 5030 (DarusSalam)