(28) باب مَبْعَثِ النَّبِيِّ صلى الله عليه وسلم
Narrated Ibn `Abbas:
Allah's Messenger (ﷺ) was inspired Divinely at the age of forty. Then he stayed in Mecca for thirteen years, and then was ordered to migrate, and he migrated to Medina and stayed there for ten years and then died.
Reference: Sahih al-Bukhari 3851
In-book reference: Book 63, Hadith 77
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 5, Book 58, Hadith 190