The last surah revealed was "Baraah" [Tawbah 9], and the last verse revealed was "They ask you for a ruling. Say, Allah gives you a ruling concerning one who has neither parents nor children" [Nisa 4:176].
آخر سورة نزلت: {براءة}، وآخر آية نزلت: {يستفتونك قل الله يفتيكم في الكللة}.
Bukhari narrated it in the tafsir (4605), and Muslim in the chapter on inheritance (1618:11), both of them via Shubah, from Abu Ishaq, who said, I heard Bara bin Azib say, and he mentioned it.