Among The Virtues of The Prophet’s City- By Imaam Muhammad Ibn Saaleh Al-Uthaymeen (Rahimahullah)
Imaam Muhammad Bin Saaleh al-Uthaymeen (rahimahullaah) was asked about the statement of the Messenger (sallal-laahua-alayhi-wasallam) that: ‘’Verily Imaan returns and goes back to Madeenah as a snake returns and goes back to its hole.’’
In this hadeeth the Messenger (sallal-laahu-alayhi-wasallam) said: ‘’ Verily Imaan returns and goes back to Madeenah as a snake returns and goes back to its hole.’’ The word (يَأرِزُ)-Yarizo with a kasrah on the letter Raa can also have a Fatha or a Dammah (on the Raa). And the meaning of (يَأرِزُ) – Yarizo is that (Islaam) will return and it will be established in Madeenah, just as a snake returns to its hole after exiting it. This is an indication from the Prophet (sallal-laahu-alahi-wasallam) that this religion will return to Madeenah after the other lands become corrupted, just as a snake goes out and roams about in the earth, and then returns to its hole after that.
In this hadeeth is also an indication that just as Islaam did spread from Madeenah, it will also return to it; for indeed Islaam’s strength and authority did not spread except from Madeenah, even though its origin was in Makkah. Makkah was the first place where the revelation came down, but the Muslims were not able to establish a state, authority and Jihaad except after migrating to Madeenah. So for this reason, Islaam’s authority, enforcement and strength spread from Madeenah, and it will return to it in the end of time.
And some of the people of knowledge say that this (hadeeth) is indicative of an affair that has preceded, and that people did come to Madeenah and return to it in order to acquire the knowledge of the Sharee-ah and to study Islaam. However, the first meaning is what is apparent from the hadeeth. 
Saheeh Bukhaari: Summarized Version: Hadeeth Number: 909
[Source:Fataawaa Fadeelatus Shaikh Al-Allaamah Muhammad Bin Saaleh Al-Uthaymeen Fil Aqeedah: Vol:1-2: page: 84-85]