Sahih al-Bukhari, Hadith 3851 ⓘ
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.
حَدَّثَنَا أَحْمَدُ بْنُ أَبِي رَجَاءٍ، حَدَّثَنَا النَّضْرُ، عَنْ هِشَامٍ، عَنْ عِكْرِمَةَ، عَنِ ابْنِ عَبَّاسٍ ـ رضى الله عنهما ـ قَالَ أُنْزِلَ عَلَى رَسُولِ اللَّهِ صلى الله عليه وسلم وَهْوَ ابْنُ أَرْبَعِينَ، فَمَكَثَ ثَلاَثَ عَشْرَةَ سَنَةً، ثُمَّ أُمِرَ بِالْهِجْرَةِ، فَهَاجَرَ إِلَى الْمَدِينَةِ، فَمَكَثَ بِهَا عَشْرَ سِنِينَ، ثُمَّ تُوُفِّيَ صلى الله عليه وسلم.
also referenced under: Book 63, Hadith 77 (In-Book) & Volume 5, Book 58, Hadith 190 (USC-MSA)