كتاب الحج
15  
The Book of Pilgrimage
(37)
Chapter: It is recommended to enter Makkah from the Upper Mountain Pass and to leave from the Lower Mountain Pass; Entering a city via a route different than the one by which you leave it
(37)
باب اسْتِحْبَابِ دُخُولِ مَكَّةَ مِنَ الثَّنِيَّةِ الْعُلْيَا وَالْخُرُوجِ مِنْهَا مِنَ الثَّنِيَّةِ السُّفْلَى وَدُخُولِ بَلْدَةٍ مِنْ طَرِيقٍ غَيْرِ الَّتِي خَرَجَ مِنْهَا
Sahih Muslim 1257 a

Ibn 'Umar reported that Allah's Messenger (ﷺ) used to come out (of Medina) by way of al-Shajarah and entered it by the way of al-Mu'arras and whenever he entered Mecca, he entered it from the upper side and went out of it from the lower side.

حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ نُمَيْرٍ، ح وَحَدَّثَنَا ابْنُ نُمَيْرٍ، حَدَّثَنَا أَبِي، حَدَّثَنَا عُبَيْدُ اللَّهِ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم كَانَ يَخْرُجُ مِنْ طَرِيقِ الشَّجَرَةِ وَيَدْخُلُ مِنْ طَرِيقِ الْمُعَرَّسِ وَإِذَا دَخَلَ مَكَّةَ دَخَلَ مِنَ الثَّنِيَّةِ الْعُلْيَا وَيَخْرُجُ مِنَ الثَّنِيَّةِ السُّفْلَى ‏.‏
Reference : Sahih Muslim 1257a
In-book reference : Book 15, Hadith 246
USC-MSA web (English) reference : Book 7, Hadith 2886
  (deprecated numbering scheme)