كتاب الجنائز
11  
The Book of Prayer - Funerals
(5)
Chapter: The upward gaze of the deceased follows his soul
(5)
باب فِي شُخُوصِ بَصَرِ الْمَيِّتِ يَتْبَعُ نَفْسَهُ ‏
Sahih Muslim 921 a

Abu Huraira reported Allah's Messenger (ﷺ) as saying:

Did you not see when the man died and his eyes were fixedly open? He (Abu Huraira) said: Yes. He (the Holy Prophet) said: It is due to the fact that when (the soul leaves the body) his eyesight follows the soul.
وَحَدَّثَنَا مُحَمَّدُ بْنُ رَافِعٍ، حَدَّثَنَا عَبْدُ الرَّزَّاقِ، أَخْبَرَنَا ابْنُ جُرَيْجٍ، عَنِ الْعَلاَءِ بْنِ، يَعْقُوبَ قَالَ أَخْبَرَنِي أَبِي أَنَّهُ، سَمِعَ أَبَا هُرَيْرَةَ، يَقُولُ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ أَلَمْ تَرَوُا الإِنْسَانَ إِذَا مَاتَ شَخَصَ بَصَرُهُ ‏"‏ ‏.‏ قَالُوا بَلَى ‏.‏ قَالَ ‏"‏ فَذَلِكَ حِينَ يَتْبَعُ بَصَرُهُ نَفْسَهُ ‏"‏ ‏.‏
Reference : Sahih Muslim 921a
In-book reference : Book 11, Hadith 10
USC-MSA web (English) reference : Book 4, Hadith 2005
  (deprecated numbering scheme)