Even before receiving nubuwwah, Rasulullah (sallallahu ‘alaihi wasallam) always believed in Allah Ta‘ala. However, at that time, Rasulullah (sallallahu ‘alaihi wasallam) was not given the detailed knowledge of the laws of shari’ah and the manner in which to carry out ibaadah, etc.
The Muhadditheen explain that after being blessed with risaalat (prophethood), the very first injunction of Deen which Rasulullah (sallallahu ‘alaihi wasallam) was taught was wudhu and salaah.
Hazrat Jibreel (‘alaihis salaam) was sent to Rasulullah (sallallahu ‘alaihi wasallam) to teach him how to perform wudhu and salaah. Hazrat Jibreel (‘alaihis salaam) came before Rasulullah (sallallahu ‘alaihi wasallam) and commenced by stamping his heel on the ground, thus causing a spring of water to flow. Hazrat Jibreel (‘alaihis salaam) then performed wudhu with this water while Rasulullah (sallallahu ‘alaihi wasallam) observed his actions. Rasulullah (sallallahu ‘alaihi wasallam) thereafter also performed wudhu in the same manner.
Hazrat Jibreel (‘alaihis salaam) then performed two rakaats of salaah with Rasulullah (sallallahu ‘alaihi wasallam) following him in the salaah. After learning how to perform wudhu and salaah, Rasulullah (sallallahu ‘alaihi wasallam) returned home and taught Hazrat Khadijah (radhiyallahu ‘anha) how to perform wudhu and salaah. (Isaabah 8/100)
Hazrat Usaamah bin Zaid (radhiyallahu ‘anhu) narrates from his father, Hazrat Zaid bin Haarithah (radhiyallahu ‘anhu), that Rasulullah (sallallahu ‘alaihi wasallam) said, “During the initial stages of my prophethood and receiving wahi, Hazrat Jibreel (‘alaihis salaam) came to me and taught me how to perform wudhu and salaah.” (Musnad Ahmed #17480)
It is established without doubt that Rasulullah (sallallahu ‘alaihi wasallam) began to perform salaah after he was blessed with prophethood. However, there is a difference of opinion in regard to whether any salaah had been made fardh upon Rasulullah (sallallahu ‘alaihi wasallam) and the ummah before the five daily salaah were made fardh on the ummah on the night of Mi’raaj.
According to some Ulama, no salaah was made fardh upon the ummah before the occasion of Mi’raaj (when the five daily salaah became fardh upon the ummah). Rather, Rasulullah (sallallahu ‘alaihi wasallam) would perform as much salaah as he wished.
According to other Ulama, there were two salaah that were fardh from the commencement of prophethood; two rakaats in the morning and two rakaats at the time of asr. Later on, Surah Muzzammil was revealed in which the Tahajjud Salaah was made fardh. This has been reported by Imaam Muzani (rahimahullah) and Imaam Yahya bin Salaam (rahimahullah). (Fat-hul Baari 1/465 and Rowdh-ul-Unf 1/423)
There are numerous verses of the Qur’aan Majeed which make reference to performing salaah at these two times. Among them is the following verse:
وَ سَبِّحۡ بِحَمۡدِ رَبِّکَ بِالۡعَشِیِّ وَ الۡاِبۡکَارِ ﴿۵۵﴾
And proclaim the purity and praise of your Rabb (through performing salaah) in the evening and morning. (Surah Ghaafir v. 55)
It is reported from Imaam Muqaatil bin Sulaimaan (rahimahullah) that in the beginning of Islam, Allah Ta‘ala stipulated two fardh rakaats in the morning and evening, and thereafter, on the night of Mi’raaj, the five salaah were made fardh.” (Uyoon-ul-Athar 1/109)
The preferred opinion is that prior to the five daily salaah becoming fardh, there was no other salaah that was made fardh upon Rasulullah (sallallahu ‘alaihi wasallam) and the ummah. (Nibraas-us-Saari 2/196)
As far as the Tahajjud Salaah is concerned, it was initially made fardh upon Rasulullah (sallallahu ‘alaihi wasallam) and the ummah to stand up for more or less half the night. However, one year later, the compulsion of standing up for more or less half the night was abrogated and replaced with standing up for any portion of the night. Later on, this compulsion of standing up for Tahajjud Salaah during the night was entirely abrogated when the five daily salaah was made fardh upon the ummah. Hence, Tahajjud Salaah is no longer fardh upon the ummah but is sunnah. (Ma’aariful Quraan 8/589-590)