كتاب المغازى
64  
Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi)
(66)
Chapter: The Hajj in which Abu Bakr led the people
(66)
باب حَجُّ أَبِي بَكْرٍ بِالنَّاسِ فِي سَنَةِ تِسْعٍ
Sahih al-Bukhari 4364

Narrated Al-Bara:

The last Sura which was revealed in full was Baraa (i.e. Sura-at-Tauba), and the last Sura (i.e. part of a Sura) which was revealed was the last Verses of Sura-an-Nisa':-- "They ask you for a legal decision. Say: Allah directs (thus) About those who have No descendants or ascendants As heirs." (4.177)

حَدَّثَنِي عَبْدُ اللَّهِ بْنُ رَجَاءٍ، حَدَّثَنَا إِسْرَائِيلُ، عَنْ أَبِي إِسْحَاقَ، عَنِ الْبَرَاءِ ـ رضى الله عنه ـ قَالَ آخِرُ سُورَةٍ نَزَلَتْ كَامِلَةً بَرَاءَةٌ، وَآخِرُ سُورَةٍ نَزَلَتْ خَاتِمَةُ سُورَةِ النِّسَاءِ ‏{‏يَسْتَفْتُونَكَ قُلِ اللَّهُ يُفْتِيكُمْ فِي الْكَلاَلَةِ‏}
Reference : Sahih al-Bukhari 4364
In-book reference : Book 64, Hadith 390
USC-MSA web (English) reference : Vol. 5, Book 59, Hadith 650
  (deprecated numbering scheme)