Bulugh al-Maram, Book 4, Hadith 646 (English)

'Amro bin Shu'aib narrated on the authority of his father, who reported on the authority of his grandfather (RAA) that the Messenger of Allah was asked about a treasure that was found by a man in some ruined land, and he said to him, “If you found it in an inhabited village, then you must advertise its having been found. However, if he found it in an uninhabited village, then on it and the rest of the discovered treasure one fifth is payable as Zakah.” Related by Ibn Majah with a reliable chain of narrators.

وَعَنْ عَمْرِو بْنِ شُعَيْبٍ, عَنْ أَبِيهِ, عَنْ جَدِّهِ; { أَنَّ اَلنَّبِيَّ ‏- صلى الله عليه وسلم ‏-قَالَ ‏-فِي كَنْزٍ وَجَدَهُ رَجُلٌ فِي خَرِبَةٍ‏-: "إِنْ وَجَدْتَهُ فِي قَرْيَةٍ مَسْكُونَةٍ, فَعَرِّفْهُ, وَإِنْ وَجَدْتَهُ فِي قَرْيَةٍ غَيْرِ مَسْكُونَةٍ, فَفِيهِ وَفِي اَلرِّكَازِ: اَلْخُمُسُ " .‏ } أَخْرَجَهُ اِبْنُ مَاجَهْ بِإِسْنَادٍ حَسَن ٍ 1‏.‏ ‏1 ‏- حسن.‏ رواه الشافعي ( 1 / 248 ‏- 249 / 673 )‏، ووهم الحافظ ‏-رحمه الله‏- في عزوه الحديث لابن ماجه، وقلده غير واحد منهم صاحب "توضيح الأحكام" فقال: أخرجه ابن ماجه بإسناد حسن ولا أدري أين رآه في ابن ماجه! ولقد وجدت وهما آخر للحافظ في نفس الحديث في "التلخيص" وبيان ذلك "بالأصل".‏

sunnah.com

also referenced under: Book 4, Hadith 625 (In-Book)