Last words uttered or heard by some great scholars before dying.

Following are some scholars who uttered or heard beautiful words before dying.
1. Hafiz Ibn Hajr al Asqalani died while Qari was reciting the verse:
: {سَلَامٌ قَوْلًا مِنْ رَبٍّ رَحِيمٍ} [يس: 58].
[And] “Peace,” a word from a Merciful Lord.
[al-Jawahir wa-al-durar by his student Hafiz Sakhawi page 1193]
2. It is proven that when Imam Abu Zur’a was dying his last words were La ilaha illAllah. (Muarifat Uloom al Hadith by al Haakim page 76)
3. Same way the last words of Amash were LA ilaha illAllah. (al Ilal Wa Muarifat al Rijaal no. 3627)

4. The death of Ibn Abdul Hadi, the one who wrote al Sarim al Munki fe Radd al Subki.

Ibn Kathir said:
His father told me when Ibn Adul Hadi was dying his last words (were the Shahadah)
أشهد أن لا اله الا الله وأشهد ان محمد رسول الله‏. اللَّهُمَّ اجْعَلْنِي من التَّوَّابِينَ، وَاجْعَلْنِي من المُتطَهِّرِينَ
His funeral was prayed in Jam`e Muzaffari. His funeral was attended by Judges of the city, elders, Scholars, Leaders, Merchants and Public. His funeral was great and packed, There was Light and Nur on it. (all Bidaya wal Nihaya vol 14 under the biography of Ibn Abdul Hadi)
5. The death of Salah ud din Ayyubi.
Ibn Kathir said when he was ill, he appointed an Imam to recite Quran near him and when the illness goes into extreme he should ask him to say Shahadah, Ibn Kathir said, he recited Quran for whole night and then:
فلما أذن الصبح جاء القاضي الفاضل فدخل عليه وهو في آخر رمق، فلما قرأ القارئ { لَا إِلَهَ إِلَّا هُوَ عَلَيْهِ تَوَكَّلْتُ } [التوبة: 129]
تبسم وتهلل وجهه وأسلم روحه إلى ربه سبحانه، ومات رحمه الله،
When he said Adhan of Fajr, Qadhi al Fadhil came to him and he was taking his last breaths, and when Qari recited “”there is no deity except Him. On Him I have relied” [al Tauba verse 129]. He (Salah ud din) smiled and his faced cheered and surrendered his soul to Lord the Almighty, and he died Rahimahullah.
[al Bidaya wal Nihaya vol 13 under 589 ]
6. Alqama also advised people to ask him for the recitation of kalima when he is about to die. (al Musannaf Ibn Abi Shaybah 3/236).

7. The Last words of Ibn Taymiyah before death.

Mur`ee bin Yusaf Hanbali said,
وكان يختم القرآن في كل عشرة أيام، وختم القرآن مدة إقامته بالقلعة إحدى وثمانين ختمة، انتهى في آخر ختمة إلى آخر اقتربت {إِنَّ الْمُتَّقِينَ فِي جَنَّاتٍ وَنَهَرٍ * فِي مَقْعَدِ صِدْقٍ عِنْدَ مَلِيكٍ مُقْتَدِرٍ}
He would complete the Qur`an in every 10 days, and he completed it 81 times when he was in the castle, He died when he was reciting: “Indeed, the righteous will be among gardens and rivers, In a seat of honor near a Sovereign, Perfect in Ability.” [al Qamar 54:55]. [Kuwakib ad-Durriyah page 174, Ghayat al Amani 2/260]
8.  Ibn kathir mentioned about Hafidh Ibn al Fardi:
وكان علامة زمانه، قتل شهيدا على يد البربر فسمعوه وهو جريح طريح يقرأ على نفسه الحديث الذي في الصحيح: «ما يكلم أحد في سبيل الله، والله أعلم بمن يكلم في سبيله، إلا جاء يوم القيامة وكلمه يدمي، اللون لون الدم، والريح ريح المسك».
وقد كان سأل الله الشهادة عند أستار الكعبة فأعطاه إياها
He was Allamah of era, he was martyred on the hands of Berbers. When he was wounded he was reading himself a hadith mentioned in Saheeha: “Whoever is wounded in Allah’s Cause, and Allah knows well who gets wounded in His Cause, will come on the Day of Resurrection with his wound having the color of blood but the scent of musk.”
Once he prayed to Allah for his martyrdom by clinging the curtain of Kaba, and he was granted.
al Bidaya wal Nihaya the year 403 h