The Migration of the Prophet – The start of the Calendar of Islam
Two views have been given regarding this matter: The famous historians believe that the decision to determine the migration as the official beginning for the calendar of Islam was taken place in the time of the 2nd caliphs rule, and was carried out by the suggestion of Ali. This happened in the 16th or 17th year AH. Due to evidence however – such as the signature of the treaty of the Prophet with the Muqna Jews – it can be concluded that this start date took place in the time of the Prophet and was by his decision, and after it was fading out in the time of the 2nd caliph, it was revived and became prevalent again.
The Beginning of The Calendar before The Migration
The Age of Ignorance
In the Age of Ignorance, because the rites of Hajj were carried out once a year, and because once complete the month of Muharram would be on the verge of beginning, the month of Muharram was the first month of the Arab Calendar.  With regards to the yearly calculations however, the Arabs did not have fixed and structured dates, and at different periods of time they would consider different dates for the origin of their calendar. This start date would mostly be based on the day a famous Arab was murdered, or based on when a bloody war took place between two tribes, or based on natural disasters.  The attack of Abrahas army against the Ka‘ba – which was destroyed due to the miracle of Allah – overshadowed all of the events before it, and for a long time was considered the beginning date for their calendar. The date of the birth of the Prophet and the birth of Ali have been recorded through this important event. In addition, another event that took place in the age of ignorance which was determined to be the start of the Arab calendar was the rebuilding of the Ka‘ba (5 years before the appointment of the Prophet to Prophethood). 
The Era of The Prophets Appointment
In the time following the Prophets Appointment, the title by which the start of the calendar was known was called “Going to the house of Arqam”. For example, it is mentioned in history that ‘Ubaydah ibn Harith became a Muslim before the “Going to the house of Arqam”. 
The Appointing of The Migration as The Beginning of The Calendar
The Importance of the Migration
From the perspective that the migration of the Prophet was considered a pre-requisite for forming an Islamic government and for Islam prevailing over the East and the West, it was an important incident. If this major event did not take place, Islam would not have been able to grow and spread, and it would have been finished in Makka.  In other words, whilst Islam was confined to Makka, it was not considered a universal religion, and it wouldn’t have been considered more than a local religion. With the occurrence of the migration however, it was possible for Islam to be spread and a situation took place such that its result was a vast number of people believing in the Oneness of Allah and in the Prophethood of Muhammad. Naturally an incident with this level of importance could become the start of the Calendar of the Muslims, especially in a society in which for centuries the recording of history was not considered important - due to cultural futility and being far from knowledge - and if a date was recorded, it would be based on a war or natural disasters, whilst the migration of the Prophet of Islam was considered a Godly and civil event.
Differences of Opinion on Who Established the Calendar
The establishment of this calendar in the period of the 2nd caliph
The famous opinion is that placing the migration of the Prophet as the beginning of the Islamic calendar took place in the time of the 2nd caliph after consultation with the companions of the Prophet. The 2nd caliph whilst caliph, (roughly 16 or 17AH) encountered differences in the recording of the time in which events took place and the date of some documents.  In order to prevent this issue from happening again, and for accreditation of historical events for the future generations, he formed a council and asked the companions of the Prophet to give their suggestions on the date for the Islamic historical occurrences. Different views were given such as the birth of the Prophet, and the day he was appointed as Prophet. Some suggested his death as the beginning of the calendar of Islam. Ali chose the migration of the Prophet as being the best starting date for the historical occurrences and this suggestion was taken into consideration by the caliph and thus his migration became the beginning of the Islamic calendar.  Other actions of the 2nd caliph regarding the Islamic calendar was changing the first month from Rabi al-Awwal (when the Prophet entered Madina)  to Muharram, because just as it was in the era of ignorance, Muharram was the month after the Hajj rites would take place thus this time period seemed to be better for the start of the new year. 
The establishment of the beginning of Islam on the order of the Prophet
Another view exists which individuals such as Ibn Shihab al-Zuhri have mentioned, which is that the migration of the Prophet was chosen as the beginning of the Calendar in the time of the Prophet by the Prophet himself.  Evidences exist which affirm this matter, for example the treaty of the Prophet with the Muqna Jews in which the signature of the Prophet at the end says:
“This treaty was written by Ali ibn Abi Talib in 9AH” .
Another piece of evidence for this claim is the treaty that was done with the Christians of Najran, in which the Prophet ordered Ali to write:
“This treaty is written in the year 5AH.” 
Using these evidences, it can be claimed that writing historical dates was prevalent in the time of the Prophet and the starting date was his migration to Madina.
It seems that the one who established the Hijri Calendar was the Prophet himself, however it is likely that until the time of Umars caliphate it was not commonly used,  It can even be argued that after the passing away of the Prophet, this calendar was forgotten, but later due to the necessity which was felt regarding this matter, this calendar was revived based on the suggestion of Ali.  Therefore, the only outcome of the council which the 2nd caliph formed was choosing Muharram in place of Rabi al-Awwal as the beginning of the year  and officially recognising the migration of the Prophet as the beginning of the Calendar, however the real originator of this date being the beginning was the Prophet himself.
- Tārīkh-e Siyāsī-e Islām,v.1, p.429
- Refer to: Al-Tanbīh wa al-Ishrāf, Pp.172-181
- Ibid, p.430
- Al-Sīrah al-Nabawiyyah, v.1, p.253
- Tārīkh Islām (Pishwā’ī), v.1, p.198
- Manāqib Āl Abī Ṭālib, v.1, p.225
- Al-Bidāyah wa al-Nihāyah, v.7, Pp.73-74
- Al-Maghāzī, v.1, p.2
- Ṭārīkh al-Ṭabarī, v.2, p.388 “When the Prophet entered Madina – and he entered Madina in Rabi al-Awwal – he ordered for the calendar to begin.”
- Futūḥ al-Buldān, Pp.71-72
- Al-Tarātīb al-Idāriyyah, v.1, p.181
- Al-Ṣaḥīḥ min Sīrah al-Nabī al-A‘dham, v.3, p.55
- Tārīkh-e Siyāsī-e Islām, v.1, p.431