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 Jibraa’eel (‘alaihis salaam) came to me and taught me how to perform wudhu and salaah.”
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 regarding whether there was any salaah which was fardh or not.
According to some ‘Ulamaa, no salaah was made fardh before the occasion of mi’raaj (when the five daily salaah became fardh). Rather, Rasulullah (sallallahu ‘alaihi wasallam) would perform as much salaah as he wished, and it was only the Tahajjud Salaah that was established.
According to other ‘Ulamaa, 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.
وَ اَقِمِ الصَّلٰوۃَ طَرَفَیِ النَّہَارِ وَ زُلَفًا مِّنَ الَّیۡلِ ؕ اِنَّ الۡحَسَنٰتِ یُذۡہِبۡنَ السَّیِّاٰتِ ؕ ذٰلِکَ ذِکۡرٰی لِلذّٰکِرِیۡنَ ﴿۱۱۴﴾ۚ
And establish salaah in both ends of the day (i.e. morning and evening)
Sometime thereafter, Surah Muzzammil was revealed and Tahajjud Salaah was established.
(Extracted from Seeratul Mustafa 1/153-154)