The Messenger of Allah ﷺ said, "Allah enjoined fifty prayers upon my nation. I returned with that until I came upon Musa.Musa asked, 'What has your Lord enjoined upon your nation?'I replied, 'He has enjoined fifty prayers upon me.'Musa said, 'Go back to your Lord, for your nation cannot bear that.'So I went back to my Lord, and He reduced half of them. I returned to Musa and informed him.He said, 'Go back to your Lord, for your nation cannot bear that.'So I went back to my Lord, and He said, 'They are five, and they are fifty. The word with Me does not change.'I returned to Musa, and he said, 'Go back to your Lord.'I said, 'I feel too shy before my Lord.'"
حدثنا حرملة بن يحيى المصري حدثنا عبد الله بن وهب أخبرني يونس بن يزيد عن ابن شهاب
قال رسول الله ﷺ فرض الله على أمتي خمسين صلاة فرجعت بذلك حتى آتي على موسى فقال موسى ماذا افترض ربك على أمتك قلت فرض علي خمسين صلاة قال فارجع إلى ربك فإن أمتك لا تطيق ذلك فراجعت ربي فوضع عني شطرها فرجعت إلى موسى فأخبرته فقال ارجع إلى ربك فإن أمتك لا تطيق ذلك فراجعت ربي فقال هي خمس وهي خمسون لا يبدل القول لدي فرجعت إلى موسى فقال ارجع إلى ربك فقلت قد استحييت من ربي
Bukhari narrated it in the Book of Prayer, chapter on how prayer was made obligatory during the Night Journey, hadith no. 349, 1636, 3342, and Muslim narrated it in the Book of Faith, chapter on the Night Journey of the Messenger of Allah ﷺ to the heavens and the obligation of the prayers, hadith no. 163, from the hadith of Yunus, by this same chain.