"Proclaim the pilgrimage among people; they will come to thee on foot and (mounted) on every kind of camel, lean on account of journeys through deep and distant mountain highways. That they may witness the benefits (provided) for them, and celebrate the name of Allah, throughout the appointed days..." (Qur'an 22:27-28).
Muslims believe that these "appointed days" (beginning with the 8th of Dhul-Hijjah) have been set since the time of Abraham, and were recognized and practiced by the Prophet Muhammad.
However, there is another type of pilgrimage to Mecca, known as the umrah (lesser pilgrimage), which may be performed any time during the year. During umrah, Muslims observe some of the same pilgrimage rites as during Hajj. However, while this experience is commendable, it does not relieve one from the requirement of performing the Hajj during the appointed annual time.