In the Quran there is a command of Allah to perform prayers for the people before the Prophet Muhammad. Salat in Islam has been done since the beginning of the prophet Muhammad’s sending, and only required salat five times after the events of Isra and mikraj.
In Isra’ Mi’raj it is mentioned that the Prophet Muhammad prayed first in Al-Aqsa before ascending to heaven and meeting the prophets. Prophet Muhammad also met Moses and he told him that his people (children of Israel) were unable to perform fifty prayers in a day.
In the Qur’an it is also said that the prayers performed by the prophets before Islam, such as Ishaq and Ya’kub in quran surah Al-Anbiya’ 21 : 72-73
وَوَهَبْنَا لَهُ إِسْحَاقَ وَيَعْقُوبَ نَافِلَةً ۖ وَكُلًّا جَعَلْنَا صَالِحِينَ
And We gave him Isaac and Jacob in addition, and all [of them] We made righteous.
وَجَعَلْنَاهُمْ أَئِمَّةً يَهْدُونَ بِأَمْرِنَا وَأَوْحَيْنَا إِلَيْهِمْ فِعْلَ الْخَيْرَاتِ وَإِقَامَ الصَّلَاةِ وَإِيتَاءَ الزَّكَاةِ ۖ وَكَانُوا لَنَا عَابِدِينَ
And We made them leaders guiding by Our command. And We inspired to them the doing of good deeds, establishment of prayer, and giving of zakāh; and they were worshippers of Us.
It is also mentioned in the Qur’an the command of prayer to the rest of the people before the Prophet Muhammad, on the Prophet Ishma, on the Prophet Jesus, on the Children of Israel, and throughout the Book.
At first the muslim prayers were prayed to Al-Aqsa in Jerusalem before finally ordered by Allah to move qibla to the building erected by Prophet Ibrahim and Ismail, namely masjid Al-Haram Kaaba.