كتاب الإيمان
1  
The Book of Faith
(87)
Chapter: The supplication of the Prophet (saws) for his ummah and his weeping out of compassion for them
(87)
باب دُعَاءِ النَّبِيِّ صلى الله عليه وسلم لأُمَّتِهِ وَبُكَائِهِ شَفَقَةً عَلَيْهِمْ ‏‏
Sahih Muslim 202

'Abdullah b. Amr b. al-'As reported:

Verily the Messenger of Allah (ﷺ) recited the words of Allah, the Great and Glorious, that Ibrahim uttered. My Lord! lo! they have led many of mankind astray:" But whoso followeth me, he verily is of me" (al-Qur'an, xiv. 35) and Jesus (peace be upon him) said:" If thou punisheth them, lo! they are Thy slaves, and if Thou forgiveth them-verily Thou art the Mighty, the Wise" (al-Qur'an, v 117). Then he raised his hands and said: O Lord, my Ummah, my Ummah, and wept; so Allah the High and the Exalted said: O Gabriel, go to Muhammad (though your Lord knows it fully well) and ask him: What makes thee weep? So Gabriel (peace be upon him) came to him and asked him, and the Messenger of Allah (ﷺ) informed him what he had said (though Allah knew it fully well). Upon this Allah said: O Gabriel, go to Muhammad and say: Verily We will please thee with regard to your Ummah and would not displease thee.
حَدَّثَنِي يُونُسُ بْنُ عَبْدِ الأَعْلَى الصَّدَفِيُّ، أَخْبَرَنَا ابْنُ وَهْبٍ، قَالَ أَخْبَرَنِي عَمْرُو بْنُ الْحَارِثِ، أَنَّ بَكْرَ بْنَ سَوَادَةَ، حَدَّثَهُ عَنْ عَبْدِ الرَّحْمَنِ بْنِ جُبَيْرٍ، عَنْ عَبْدِ اللَّهِ بْنِ عَمْرِو بْنِ الْعَاصِ، أَنَّ النَّبِيَّ صلى الله عليه وسلم تَلاَ قَوْلَ اللَّهِ عَزَّ وَجَلَّ فِي إِبْرَاهِيمَ ‏{‏ رَبِّ إِنَّهُنَّ أَضْلَلْنَ كَثِيرًا مِنَ النَّاسِ فَمَنْ تَبِعَنِي فَإِنَّهُ مِنِّي‏}‏ الآيَةَ ‏.‏ وَقَالَ عِيسَى عَلَيْهِ السَّلاَمُ ‏{‏ إِنْ تُعَذِّبْهُمْ فَإِنَّهُمْ عِبَادُكَ وَإِنْ تَغْفِرْ لَهُمْ فَإِنَّكَ أَنْتَ الْعَزِيزُ الْحَكِيمُ‏}‏ فَرَفَعَ يَدَيْهِ وَقَالَ ‏"‏ اللَّهُمَّ أُمَّتِي أُمَّتِي ‏"‏ ‏.‏ وَبَكَى فَقَالَ اللَّهُ عَزَّ وَجَلَّ يَا جِبْرِيلُ اذْهَبْ إِلَى مُحَمَّدٍ وَرَبُّكَ أَعْلَمُ فَسَلْهُ مَا يُبْكِيكَ فَأَتَاهُ جِبْرِيلُ - عَلَيْهِ الصَّلاَةُ وَالسَّلاَمُ - فَسَأَلَهُ فَأَخْبَرَهُ رَسُولُ اللَّهِ صلى الله عليه وسلم بِمَا قَالَ ‏.‏ وَهُوَ أَعْلَمُ ‏.‏ فَقَالَ اللَّهُ يَا جِبْرِيلُ اذْهَبْ إِلَى مُحَمَّدٍ فَقُلْ إِنَّا سَنُرْضِيكَ فِي أُمَّتِكَ وَلاَ نَسُوءُكَ ‏.‏
Reference : Sahih Muslim 202
In-book reference : Book 1, Hadith 405
USC-MSA web (English) reference : Book 1, Hadith 397
  (deprecated numbering scheme)