كتاب الحج
15  
The Book of Pilgrimage
(85)
Chapter: The virtue of Al-Madinah and the Prophet's Prayer for it to be blessed. Its sanctity and the sanctity of its game and trees. The Boundaries of its sanctuary
(85)
باب فَضْلِ الْمَدِينَةِ وَدُعَاءِ النَّبِيِّ صلى الله عليه وسلم فِيهَا بِالْبَرَكَةِ وَبَيَانِ تَحْرِيمِها وَتَحْرِيمِ صَيْدِهَا وَشَجَرِهَا وَبَيَانِ حُدُودِ حَرَمِهَا
Sahih Muslim 1363 a

Amir b. Sa'd reported on the authority of his father (Allah be pleased with him) that Allah's Messenger (ﷺ) said:

I have declared sacred the territory between the two lava plains of Medina, so its trees should not be cut down, or its game killed; and he also said: Medina is best for them if they knew. No one leaves it through dislike of it without Allah putting in it someone better than he in place of him; and no one will stay there in spite of its hardships and distress without my being an intercessor or witness on behalf of him on the Day of Resurrection.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ نُمَيْرٍ، ح وَحَدَّثَنَا ابْنُ نُمَيْرٍ، حَدَّثَنَا أَبِي، حَدَّثَنَا عُثْمَانُ بْنُ حَكِيمٍ، حَدَّثَنِي عَامِرُ بْنُ سَعْدٍ، عَنْ أَبِيهِ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ إِنِّي أُحَرِّمُ مَا بَيْنَ لاَبَتَىِ الْمَدِينَةِ أَنْ يُقْطَعَ عِضَاهُهَا أَوْ يُقْتَلَ صَيْدُهَا - وَقَالَ - الْمَدِينَةُ خَيْرٌ لَهُمْ لَوْ كَانُوا يَعْلَمُونَ لاَ يَدَعُهَا أَحَدٌ رَغْبَةً عَنْهَا إِلاَّ أَبْدَلَ اللَّهُ فِيهَا مَنْ هُوَ خَيْرٌ مِنْهُ وَلاَ يَثْبُتُ أَحَدٌ عَلَى لأْوَائِهَا وَجَهْدِهَا إِلاَّ كُنْتُ لَهُ شَفِيعًا أَوْ شَهِيدًا يَوْمَ الْقِيَامَةِ ‏"‏ ‏.‏
Reference : Sahih Muslim 1363a
In-book reference : Book 15, Hadith 522
USC-MSA web (English) reference : Book 7, Hadith 3154
  (deprecated numbering scheme)