Assalamualaikum ustaz. How was the obligation of prayer fulfilled before the Isra’ Mikraj incident?
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions and all those who follow his footsteps until the Last Day.
The author of the book al-Fiqh al-Manhaji stated: Allah SWT obligated several prayers on every mukallaf Muslim are Subuh, Zuhur, Asar, Maghrib and Isya’.
All of these five prayers are sanctioned on the night Rasullullah PBUH Isra’ to Baitu al-Maqdis and Mikraj to the heavens. Allah SWT obligated 50 prayers for a whole day and night to the Prophet Muhammad PBUH and the Muslim ummah. Then, Allah decreased it to five and we’ll be rewarded with 50 prayers.
In a hadith regarding Isra’ and Mikraj, the Messenger PBUH said:
فُرِجَ عَنْ سَقْفِ بَيْتِى وَأَنَا بِمَكَّةَ، فَنَزَلَ جِبْرِيلُ ثُمَّ أَخَذَ بِيَدِى فَعَرَجَ بِى إِلَى السَّمَاءِ الدُّنْيَا فَفَرَضَ اللَّهُ عَلَى أُمَّتِى خَمْسِينَ صَلاَةً فَرَاجَعْتُهُ فَقَالَ: هِىَ خَمْسٌ وَهْىَ خَمْسُونَ، لاَ يُبَدَّلُ الْقَوْلُ لَدَىَّ.
“While I was at Mecca the roof of my house was opened and Gabriel descended, then he took my hand and ascended with me to the heavens. Then Allah enjoined fifty prayers on my followers. So I went back to Allah and requested for reduction. Allah said, “These are five prayers and they are all (equal to) fifty (in reward) for My Word does not change.” 
The incident of Isra’ happened 18 months before the Prophet PBUH migrated to Medina. Thus, the five obligatory prayers abrogate the previous two rakaat prayer which was performed every morning and evening. 
In answering the above question, Muslim prayers two rakaat in the morning and two rakaat in the evening before the Israk and Mi’raj incident. This is the opinion of al-Harbi.  The same is narrated from al-Hasan in his commentary of the following verse of the Quran:
وَاذْكُر رَّبَّكَ كَثِيرًا وَسَبِّحْ بِالْعَشِيِّ وَالْإِبْكَارِ
“And remember your Lord much and exalt [Him with praise] in the evening and the morning.”  
Ibn Rajab al-Hanbali cited Ibn ‘Abbas saying: From Sufyan regarding the hadith of Hiraql, he said:
يَأْمُرُنَا – يَعْنِي النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ – بِالصَّلاَةِ وَالصِّدْقِ وَالْعَفَافِ
“He (the Messenger PBUH) orders us to offer prayers; to give alms; to be chaste, and to keep good relations with our relatives.” 
This narration shows that since the beginning Rasullullah PBUH has commanded his ummah to pray, be honest and protect their chastity. The Prophet PBUH himself practised this before the obligation of the five daily prayers.
This is further reaffirmed by Ibn Rajab: “Numerous hadiths that explain that the Prophet PBUH performed prayer before the Isra’ incident can be found.” 
However, scholars have differing opinions regarding how the Prophet PBUH prayed before the Isra’ incident. But it is clear, the obligation of prayer has existed before the Isra’ incident. Ibnu Rajab stated: “Some say that at the beginning, the prayer obligated for Rasullullah PBUH is two rakaat Subuh and two rakaat prayer at night. This is as stated by Qatadah:
كَانَ بَدْءُ الصَّلَاةِ رَكْعَتَيْنِ بِالْغَداةِ، وَرَكْعَتَيْنِ بالعَشيِّ
“The first prayer performed are two rakaat in the morning and two rakaat in the evening.”