Musnad Ahmad 6599
حَدَّثَنَا حَسَنٌ ، حَدَّثَنَا ابْنُ لَهِيعَةَ ، حَدَّثَنَا حُيَيُّ بْنُ عَبْدِ اللَّهِ ، أَنَّ أَبَا عَبْدِ الرَّحْمَنِ حَدَّثَهُ، أَنَّهُ سَمِعَ عَبْدَ اللَّهِ بْنَ عَمْرِو بْنِ العاص ، يَقُولُ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ،" مَنْ رَاحَ إِلَى مَسْجِدِ الْجَمَاعَةِ، فَخَطْوَةٌ تَمْحُو سَيِّئَةً، وَخَطْوَةٌ تُكْتَبُ لَهُ حَسَنَةٌ، ذَاهِبًا وَرَاجِعًا".
Hasan narrated to us; [he said:] Ibn Lahiʿah narrated to us; [he said:] Huyayy ibn ʿAbdullah narrated to us that Abu ʿAbd ar-Rahman narrated to him that he heard ʿAbdullah ibn ʿAmr ibn al-ʿAs say: The Messenger of Allah ﷺ said: "Whoever goes to the congregational mosque, one step wipes out a bad deed and one step is written for him as a good deed, going and returning."