Hadithcore
Mishkat al-Masabih, 2178

Ma'qil b. Yasār al-Muzanī reported the Prophet (ﷺ) as saying, “If anyone recites <i>Yā’ Sīn</i> (Qur’ān, 36) out of a desire for God's favour, his past sins will be forgiven him; so recite it over those of you who are dying.” Baihaqī transmitted it in <i>Shu'ab al-īmān</i>.

وَعَن معقل بن يسَار الْمُزنِيّ رَضِيَ اللَّهُ عَنْهُ أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: «مَنْ قَرَأَ (يس) ابْتِغَاءَ وَجْهِ اللَّهِ تَعَالَى غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنبه فاقرؤوها عِنْدَ مَوْتَاكُمْ» . رَوَاهُ الْبَيْهَقِيُّ فِي شُعَبِ الْإِيمَانِ

References1 variant
In-Book Reference
Book 8, Hadith 68