Sahih al-Bukhari, Hadith 4605

Narrated Al-Bara: The last Sura that was revealed was Bara'a, and the last Verse that was revealed was: "They ask you for a legal verdict, Say: Allah's directs (thus) about those who leave no descendants or ascendants as heirs." (4.176)

حَدَّثَنَا سُلَيْمَانُ بْنُ حَرْبٍ، حَدَّثَنَا شُعْبَةُ، عَنْ أَبِي إِسْحَاقَ، سَمِعْتُ الْبَرَاءَ ـ رضى الله عنه ـ قَالَ آخِرُ سُورَةٍ نَزَلَتْ بَرَاءَةَ، وَآخِرُ آيَةٍ نَزَلَتْ ‏{‏يَسْتَفْتُونَكَ ‏}‏

sunnah.com