Abu Hurairah reported,

The Messenger of Allah ﷺ said, "Yajuj and Majuj dig every day until, when they are about to see the rays of the sun, the one in charge of them says, 'Go back, we will dig it tomorrow.' Then Allah restores it stronger than it was. When their appointed time arrives and Allah wishes to send them out against the people, they will dig until, when they are about to see the rays of the sun, the one in charge of them will say, 'Go back, you will dig it tomorrow, if Allah Most High wills,' making the exception. So they return to it and find it as they had left it. They dig through it and emerge upon the people. They drink up the water, and the people fortify themselves against them in their strongholds. They shoot their arrows up to the sky, and the arrows return stained with blood, so they say, 'We have overcome the people of the earth and risen above the people of the sky.' Then Allah sends a worm into the napes of their necks and kills them with it."The Messenger of Allah ﷺ said, "By the One in whose hand my soul is, the beasts of the earth will grow fat and thrive abundantly from their flesh."

Ibn Majah 4080

Sahih

حدثنا أزهر بن مروان حدثنا عبد الأعلى حدثنا سعيد عن قتادة قال حدثنا أبو رافع

عن أبي هريرة قال

قال رسول الله ﷺ إن يأجوج ومأجوج يحفرون كل يوم حتى إذا كادوا يرون شعاع الشمس قال الذي عليهم ارجعوا فسنحفره غدا فيعيده الله أشد ما كان حتى إذا بلغت مدتهم وأراد الله أن يبعثهم على الناس حفروا حتى إذا كادوا يرون شعاع الشمس قال الذي عليهم ارجعوا فستحفرونه غدا إن شاء الله تعالى واستثنوا فيعودون إليه وهو كهيئته حين تركوه فيحفرونه ويخرجون على الناس فينشفون الماء ويتحصن الناس منهم في حصونهم فيرمون بسهامهم إلى السماء فترجع عليها الدم الذي اجفظ فيقولون قهرنا أهل الأرض وعلونا أهل السماء فيبعث الله نغفا في أقفائهم فيقتلهم بها قال رسول الله ﷺ والذي نفسي بيده إن دواب الأرض لتسمن وتشكر شكرا من لحومهم

ابن ماجه 4080صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Tribulations
Chapter
Tribulation of Dajjal, the coming of Isa bin Maryam, and the emergence of Yajuj and Majuj
Numbering
Darussalam 4080
Ibn Majah 4080