The last surah revealed was "Bara'ah" [Tawbah 9], and the last verse revealed was "They ask you for a ruling. Say, Allah gives you a ruling concerning the one who leaves neither parents nor children" [Nisa 4:176].
آخر سورة نزلت{براءة} وآخر آية نزلت: {يستفتونك قل الله يفتيكم في الكلالة} [النساء: ١٧٦].
Bukhari related it in the tafsir chapter (4605), and Muslim in the chapter on inheritance shares (1618), both from the hadith of Shubah, from Abu Ishaq, who said, "I heard Bara," and he mentioned it.In another version, "The last surah revealed in full was Surah Tawbah." Muslim related it via Zakariya, from Abu Ishaq.