Sunan an-Nasa'i, Volume 1, Book 8, Hadith 716 (DarusSalam) ⓘ
It was narrated from 'Amr bin Shu'aib, from his father, from his grandfather, that the Prophet forbade reciting poetry in the Masjid.
أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا اللَّيْثُ بْنُ سَعْدٍ، عَنِ ابْنِ عَجْلاَنَ، عَنْ عَمْرِو بْنِ شُعَيْبٍ، عَنْ أَبِيهِ، عَنْ جَدِّهِ، أَنَّ النَّبِيَّ صلى الله عليه وسلم نَهَى عَنْ تَنَاشُدِ الأَشْعَارِ فِي الْمَسْجِدِ .
also referenced under: Hadith 715 (Reference) & Book 8, Hadith 28 (In-Book)