A question was posed to Sheikh al-Islaam ibn Taymiyah: Which are more virtuous, the first ten of Dh’ul-Hijjah or the last ten of Ramadan? So he replied:
أيام عشر ذي الحجة أفضل من أيام العشر من رمضان، والليالي العشر الأواخر من رمضان أفضل من ليالي عشر ذي الحجة
The days of the first ten of Dhu’l-Hijjah are more virtuous than the days of the last ten of Ramadan while the nights of the last ten of Ramadan are more virtuous than the nights of the first ten of Dhu’l-Hijjah.
[Majmoo’ al-Fataawa 25/154]
Ibn Taymiyah’s student Ibn al-Qayyim commented and elaborated upon his teacher’s response in one of his own works by writing:
وإذا تأمل الفاضل اللبيب هذا الجواب وجده شافيا كافيا، فإنه ليس من أيام العمل فيها أحب إلى الله من أيام عشر ذي الحجة. وفيها يوم عرفة ويوم النحر ويوم التروية. وأما ليالي عشر رمضان فهي ليالي الأحياء التي كان رسول الله صلى الله عليه وسلم يحييها كلها، وفيها ليلة خير من ألف شهر. فمن أجاب بغير هذا التفصيل، لم يمكنه أن يدلي بحجة صحيحة
If an honorable and sensible person were to consider this answer, he would find it to be comprehensive and sufficient. Indeed, there are no days in which deeds are more beloved to Allah than the first ten days of Dhu’l-Hijjah – and they contain the Day of ‘Arafah, the Day of the Sacrifice, and the Day of Tarwiyah [the 9th, 10th, and 8th days, respectively].
As for the last ten nights of Ramadan, then they are nights of remaining awake in which the Prophet (ﷺ) used to remain awake for all of them, and they contain a night which is better than one thousand months.
So whoever answers with anything other than this precise explanation, then he will not be able to substantiate that with authentic evidence.
[al-Bidaa’i al-Fawaa’id 3/660]
Another student of ibn Taymiyah, al-haafidh Ismaa’eel ibn Kathir, also addressed this issue in his famous book of tafsir where he discussed some of the virtues of the first ten days of Dhu’l-Hijjah and then wrote:
وبالجملة ، فهذا العشر قد قيل : إنه أفضل أيام السنة ، كما نطق به الحديث ، ففضله كثير على عشر رمضان الأخير; لأن هذا يشرع فيه ما يشرع في ذلك ، من صيام وصلاة وصدقة وغيره ، ويمتاز هذا باختصاصه بأداء فرض الحج فيه . وقيل : ذاك أفضل لاشتماله على ليلة القدر ، التي هي خير من ألف شهر . وتوسط آخرون فقالوا : أيام هذا أفضل ، وليالي ذاك أفضل . وبهذا يجتمع شمل الأدلة ، والله أعلم . ـ
In sum, it has been said about these ten of Dhu’l-Hijjah that they are the most virtuous days of the year, as has been explicitly stated in a hadeeth, and therefore their virtue is greater than the last ten of Ramadan. This is because the acts which are legislated during those last ten of Ramadan are also legislated during these first ten of Dhu’l-Hijjah – i.e. fasting, prayer, charity, and so on -, however the ten of Dhu’l-Hijjah are distinguished by their being the only time during which the obligation of the Hajj is carried out.
But, on the other hand, it is said that the last ten of Ramadan are more virtuous due to their containing Laylah al-Qadr, which is better than one thousand months.
However, others have taken a middle path and said that these ten days of Dhu’l-Hijjah are the most most virtuous of days, while those ten nights of Ramadan are the most virtuous of nights, and in doing so they have reconciled the contents of the source texts. And Allah knows best.
[Tafsir ibn Kathir 5/417]
See also: Khutbah regarding Hajj: Imam al-Sa’di