Muharram is the first month of the Islamic Hijri calendar. It is based on the migration of the Prophet Muhammad saw from Mecca to Medina in 622 AD. However, the use of the Hijri calendar began in AD 639 or 17 AH during the Khilafat of Syede.Na Umar Farooq ra.
The governor of Yemen during this reign was Abu Musa Ashari. The letters which Umar ra, used to send to him did not bear any date. He informed umar ra about it who then decided to resolve this issue by setting up a small committee.
It was decided that the Islamic calendar will begin from the hijrat (migration) of the Muslims from Mecca to Medina. Therefore AD 622 became the 1 AH and since the decision to migrate was made right at the end of the month of Dhul-Hajj, and the first moon to rise after this was that of Muharram, thus Muharram came to be the first month of the Islamic Hijri calendar.(Fatah Al bari 334/7 Hadith 3934)