كتاب الحج
15  
The Book of Pilgrimage
(91)
Chapter: The Prophet saws foretold that the people will abandon Al-Madinah when it is the best it ever was
(91)
باب فِي الْمَدِينَةِ حِينَ يَتْرُكُهَا أَهْلُهَا ‏‏
Sahih Muslim 1389 b

Abu Huraira (Allah be pleased with him) heard Allah's Messenger (ﷺ) say:

They (the residents of) Medina will abandon Medina whereas it is good for them and it will be haunted by beasts and birds, and two shepherds will come out from Muzainah intending (to go) towards Medina and tending their herd, and will find nothing but wilderness there until when they will reach the mountain path of Wada, they will fall down on their faces.
وَحَدَّثَنِي عَبْدُ الْمَلِكِ بْنُ شُعَيْبِ بْنِ اللَّيْثِ، حَدَّثَنِي أَبِي، عَنْ جَدِّي، حَدَّثَنِي عُقَيْلُ بْنُ، خَالِدٍ عَنِ ابْنِ شِهَابٍ، أَنَّهُ قَالَ أَخْبَرَنِي سَعِيدُ بْنُ الْمُسَيَّبِ، أَنَّ أَبَا هُرَيْرَةَ، قَالَ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ ‏ "‏ يَتْرُكُونَ الْمَدِينَةَ عَلَى خَيْرِ مَا كَانَتْ لاَ يَغْشَاهَا إِلاَّ الْعَوَافِي - يُرِيدُ عَوَافِيَ السِّبَاعِ وَالطَّيْرِ - ثُمَّ يَخْرُجُ رَاعِيَانِ مِنْ مُزَيْنَةَ يُرِيدَانِ الْمَدِينَةَ يَنْعِقَانِ بِغَنَمِهِمَا فَيَجِدَانِهَا وَحْشًا حَتَّى إِذَا بَلَغَا ثَنِيَّةَ الْوَدَاعِ خَرَّا عَلَى وُجُوهِهِمَا ‏"‏ ‏.‏
Reference : Sahih Muslim 1389b
In-book reference : Book 15, Hadith 571
USC-MSA web (English) reference : Book 7, Hadith 3203
  (deprecated numbering scheme)