Yes, the Prophet ﷺ did cry at the passing of his son. Crying at the passing of a loved one is permitted. However, exaggerating or wailing whilst crying is prohibited.
عَنْ أَنَسِ بْنِ مَالِكٍ رَضِيَ اللَّهُ عَنْهُ، قَالَ: دَخَلْنَا مَعَ رَسُولِ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ عَلَى أَبِي سَيْفٍ القَيْنِ، وَكَانَ ظِئْرًا لِإِبْرَاهِيمَ عَلَيْهِ السَّلاَمُ، فَأَخَذَ رَسُولُ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ إِبْرَاهِيمَ، فَقَبَّلَهُ، وَشَمَّهُ، ثُمَّ دَخَلْنَا عَلَيْهِ بَعْدَ ذَلِكَ وَإِبْرَاهِيمُ يَجُودُ بِنَفْسِهِ، فَجَعَلَتْ عَيْنَا رَسُولِ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ تَذْرِفَانِ، فَقَالَ لَهُ عَبْدُ الرَّحْمَنِ بْنُ عَوْفٍ رَضِيَ اللَّهُ عَنْهُ: وَأَنْتَ يَا رَسُولَ اللَّهِ؟ فَقَالَ: «يَا ابْنَ عَوْفٍ إِنَّهَا رَحْمَةٌ»، ثُمَّ أَتْبَعَهَا بِأُخْرَى، فَقَالَ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ: «إِنَّ العَيْنَ تَدْمَعُ، وَالقَلْبَ يَحْزَنُ، وَلاَ نَقُولُ إِلَّا مَا يَرْضَى رَبُّنَا، وَإِنَّا بِفِرَاقِكَ يَا إِبْرَاهِيمُ لَمَحْزُونُونَ
On the authority of Anas Ibn Malik (May Allah be pleased with him) who said: We entered, with the Messenger of Allah ﷺ, upon Abi Sayf al-Qayn, he was the husband of the wet-nurse of Ibrahim (peace be upon him). The Messenger of Allah ﷺ took Ibrahim, kissed him and inhaled his scent. Then we entered upon him ﷺ later, whilst Ibrahim was passing away. The eyes of the Messenger of Allah ﷺ began to shed tears. So Abd al-Rahman ibn Awf (May Allah be pleased with him) said, ‘And you, O Messenger of Allah ﷺ?’ He ﷺ said ‘O son of Awf, indeed, it is mercy.’ Then he ﷺ followed it with another, and said, ‘Indeed the eye sheds tears, and the heart sorrows, but we do not say anything except that which pleases our Lord. And upon your departure, O Ibrahim, indeed we are in sorrow.’ (Sahih al- Bukhari, 1303).
As seen in the authentic Hadith above the Holy Prophet ﷺ did cry at the passing of his blessed son Ibrahim (peace be upon him). This is not to say that the Prophet ﷺ cried at the passing of everyone close to him. Rather we do not have narrations to establish such a claim. However, it is certainly the case that the holy Prophet ﷺ wept at times. There are authentic narrations to establish this.
There is some difference of opinion regarding what is meant by, then he ﷺ followed it with another.
ثُمَّ أَتْبَعَهَا وَاللَّهِ بِأُخْرَى بِزِيَادَةِ الْقَسَمِ قِيلَ أَرَادَ بِهِ أَنَّهُ أَتْبَعَ الدَّمْعَةَ الْأُولَى بِدَمْعَةٍ أُخْرَى وَقِيلَ أَتْبَعِ الْكَلِمَةَ الْأُولَى الْمُجْمَلَةَ وَهِيَ قَوْلُهُ إِنَّهَا رَحْمَةٌ بِكَلِمَةٍ أُخْرَى مُفَصَّلَةٍ وَهِيَ قَوْلُهُ إِنَّ الْعَيْنَ تَدْمَعُ. (فتح الباري شرح صحيح البخاري)
Then, by Allah, he followed it with another. The oath was additional (in this narration). It has been said that he (the narrator) intended by it (the sentence: he followed it with another) that he ﷺ followed his first tear with another tear. And it is said that it means, he followed his first statement, ‘Indeed it is a mercy,’ which was ambiguous, with another statement, which was clear. Namely, his statement ‘Indeed the eye sheds tears.’ (Imam Ibn Hajr al-Asqalani, Fath al-Bari, Sharh Sahih al-Bukhari).
And Allah Most High Knows Best.
-Answered by Shaykh Noorud-deen Rashid (07.06.2022)
-Special thanks to Sidi Yusuf Asghar for assisting with Nusoos translation.
Is it permitted to cry when a person dies
What should you say when a person dies.
See also video: