كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ
5  
The Book of Mosques and Places of Prayer
(45)
Chapter: The prohibition of leaving the masjid once the Mu’adhdhin has called the Adhan
(45)
باب النَّهْىِ عَنِ الْخُرُوجِ، مِنَ الْمَسْجِدِ إِذَا أَذَّنَ الْمُؤَذِّنُ ‏
Sahih Muslim 655 a

Abu Sha'tha' reported:

While we were sitting with Abu Huraira in a mosque a man went out of the mosque after the call to prayer had been announced. (A man stood up in the mosque and set off.) Abu Huraira's eyes followed him till he went out of the mosque. Upon this Abu Huraira said: This man has disobeyed Abu'l- Qasim (Muhammad) (ﷺ).
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا أَبُو الأَحْوَصِ، عَنْ إِبْرَاهِيمَ بْنِ الْمُهَاجِرِ، عَنْ أَبِي الشَّعْثَاءِ، قَالَ كُنَّا قُعُودًا فِي الْمَسْجِدِ مَعَ أَبِي هُرَيْرَةَ فَأَذَّنَ الْمُؤَذِّنُ فَقَامَ رَجُلٌ مِنَ الْمَسْجِدِ يَمْشِي فَأَتْبَعَهُ أَبُو هُرَيْرَةَ بَصَرَهُ حَتَّى خَرَجَ مِنَ الْمَسْجِدِ فَقَالَ أَبُو هُرَيْرَةَ أَمَّا هَذَا فَقَدْ عَصَى أَبَا الْقَاسِمِ صلى الله عليه وسلم ‏.‏
Reference : Sahih Muslim 655a
In-book reference : Book 5, Hadith 322
USC-MSA web (English) reference : Book 4, Hadith 1377
  (deprecated numbering scheme)