Seeking Knowledge is the best of deeds after the Obligatory Duties
Ibn al-Qayyim (may Allaah have mercy on him) said, explaining the virtue of knowledge:
ان كثيرا من الائمة صَرَّحُوا بِأَن افضل الاعمال بعد الْفَرَائِض طلب الْعلم
فَقَالَ الشَّافِعِي لَيْسَ شَيْء بعد الْفَرَائِض افضل من طلب الْعلم وَهَذَا الَّذِي ذكر اصحابه عَنهُ انه مذْهبه وَكَذَلِكَ قَالَ سُفْيَان الثَّوْريّ وَحَكَاهُ الْحَنَفِيَّة عَن ابي حنيفَة
Many of the Imams clearly stated that the best of deeds after the obligatory duties is seeking knowledge.
Al-Shaafa’i (may Allaah have mercy on him) said: There is nothing after the obligatory duties that is better than seeking knowledge. This is what his companions narrated was his opinion. This was also stated by Sufyaan al-Thawri (may Allaah have mercy on him), and the Hanafis narrated this from Abu Haneefah (may Allaah have mercy on him).
واما الامام احْمَد فَحكى عَنهُ ثَلَاث رِوَايَات احداهن انه الْعلم فَإِنَّهُ قيل لَهُ أَي شَيْء احب اليك اجْلِسْ بِاللَّيْلِ انسخ اَوْ اصلي تَطَوّعا قَالَ نسخك تعلم بِهِ امور دينك فَهُوَ احب الي وَذكر الْخلال عَنهُ فِي كتاب الْعلم نصوصا كَثِيرَة فِي تَفْضِيل الْعلم وَمن كَلَامه فِيهِ النَّاس الى الْعلم احوج مِنْهُم الى الطَّعَام وَالشرَاب
Three opinions were narrated from Imam Ahmed (may Allaah have mercy on him):
The first was that the best of deeds after the obligatory duties is seeking knowledge, because it was said to him: “What thing is dearest to you, for me to sit at night copying (texts) or to offer voluntary prayers? He said: Your copying (texts) and learning about your religion from it, that is dearer to me.
Al-Khallaal quoted many texts from him in Kitaab al-‘Ilm about the virtue of knowledge, for example, he said: People’s need for knowledge is greater than their need for food and drink.
وَقد تقدم الرِّوَايَة الثَّانِيَة ان افضل الاعمال بعدالفرائض صَلَاة التَّطَوُّع وَاحْتج لهَذِهِ الرِّوَايَة بقوله وَاعْلَمُوا ان خير اعمالكم الصَّلَاة وَبِقَوْلِهِ فِي حَدِيث ابي ذَر وَقد سَأَلَهُ عَن الصَّلَاة فَقَالَ خيرموضوع وَبِأَنَّهُ اوصى من سَأَلَهُ مُوَافَقَته فِي الْجنَّة بِكَثْرَة السُّجُود وَهُوَ الصَّلَاة وَكَذَلِكَ قَوْله فِي الحَدِيث الاخر عَلَيْك بِكَثْرَة السُّجُود فَإنَّك لَا تسْجد لله سَجْدَة إِلَّا رفعك الله بهَا دَرَجَة وَحط عَنْك بهَا خَطِيئَة وبالاحاديث الدَّالَّة على تَفْضِيل الصَّلَاة
The second is that the best of deeds after the obligatory duties is voluntary prayer, and he quoted as evidence for this the words “Know that the best of your deeds is prayer” and the hadeeth of Abu Dharr, when he asked him (the Prophet (peace and blessings of Allaah be upon him)) about prayer and he said “(It) is the best that has been prescribed.”
And he quoted the fact that the Prophet (peace and blessings of Allaah be upon him) advised the one who asked to be close to him in Paradise to do a lot of prostration, i.e., prayer, and the fact that in another hadeeth he said: “You should prostrate, for you do not do one prostration for Allaah, but Allaah will raise you one degree (in status) thereby and will remove one sin from you thereby.” And there are many other ahaadeeth which speak of the virtue of prayer.
وَالرِّوَايَة الثَّالِثَة انه الْجِهَاد فَإِنَّهُ قَالَ لَا اعْدِلْ بِالْجِهَادِ شَيْئا من ذَا يطيقه وَلَا ريب ان اكثر الاحاديث فِي الصَّلَاة وَالْجهَاد
The third opinion is that jihad is the best of deeds, and he (Imam Ahmad) said: I cannot think of anything that matches jihad. And there is no doubt that most of the ahaadeeth speak of prayer and jihad.
وَأما مَالك فَقَالَ ابْن الْقَاسِم سَمِعت مَالِكًا يَقُول ان اقواما ابْتَغوا الْعِبَادَة وأضاعوا الْعلم فَخَرجُوا على امة مُحَمَّد بِأَسْيَافِهِمْ وَلَو ابْتَغوا الْعلم لحجزهم عَن ذَلِك
With regard to Imaam Maalik (may Allaah have mercy on him), Ibn al-Qaasim said: I heard Maalik say:
Some people pursued worship and ignored knowledge, then they engaged in an armed rebellion against the ummah of Muhammad (peace and blessings of Allaah be upon him). If they had sought knowledge, it would have prevented them from doing that.
قَالَ مَالك وَكتب ابو مُوسَى الاشعري الى عمر بن الْخطاب انه قرا الْقُرْآن عندنَا عددكذا وَكَذَا فَكتب اليه عمر ان افْرِضْ لَهُم من بَيت المَال فَلَمَّا كَانَ فِي الْعَام الثَّانِي كتب اليه انه قد قرا الْقُرْآن عندنَا عدد كثير لأكْثر من ذَلِك فَكتب اليه عمر ان امحهم من الدِّيوَان فَانِي اخاف من ان يسْرع النَّاس فِي الْقُرْآن ان يتفقهوا فِي الدّين فيتأولوه على غير تَأْوِيله
وَقَالَ ابْن وهب كنت بَين يَدي مَالك بن انس فَوضعت الواحي وَقمت الى الصَّلَاة فَقَالَ مَا الَّذِي قُمْت اليه بِأَفْضَل من الَّذِي تركته
Maalik said: Abu Moosa al-Ash’ari wrote to ‘Umar ibn al-Khattaab (saying) that there are people with us who read the Qur’aan, such and such a number of them. ‘Umar wrote back to him, telling him to allocate them a stipend from the bayt al-Maal (treasury of the Islamic state). The following year, he wrote to him saying that many people, more than before, were reading the Qur’aan. ‘Umar wrote back to him telling him to erase their names from the record saying, “I am afraid that people will be hasty in reading the Qur’aan and will not understand the religion properly, then they will distort its meanings.”
Ibn Wahb said: Maalik ibn Anas was in front of me and I put my tablets down and got up to pray, and he said: “What you have got up for is better than that which you have left.”
Source: Miftaah Daar al-Sa’aadah, Volume 1, pages 119-120.
Shaykh al-Islam Ibn Taymiyah (may Allaah have mercy on him) was asked to point out to me what is the best righteous deed after the obligatory duties. He (may Allaah have mercy on him) replied as follows:
وَأَمَّا مَا سَأَلْت عَنْهُ مِنْ أَفْضَلِ الْأَعْمَالِ بَعْدَ الْفَرَائِضِ؛ فَإِنَّهُ يَخْتَلِفُ بِاخْتِلَافِ النَّاسِ فِيمَا يَقْدِرُونَ عَلَيْهِ وَمَا يُنَاسِبُ أَوْقَاتَهُمْ فَلَا يُمْكِنُ فِيهِ جَوَابٌ جَامِعٌ مُفَصَّلٌ لِكُلِّ أَحَدٍ لَكِنْ مِمَّا هُوَ كَالْإِجْمَاعِ بَيْنَ الْعُلَمَاءِ بِاَللَّهِ وَأَمْرِهِ: أَنَّ مُلَازَمَةَ ذِكْرِ اللَّهِ دَائِمًا هُوَ أَفْضَلُ مَا شَغَلَ الْعَبْدَ بِهِ نَفْسَهُ فِي الْجُمْلَةِ
What you have asked about, the best deed after the obligatory duties, varies from one person to another, depending on what they are able to do and what is best at any given time. So it is not possible to give a comprehensive, detailed answer that suits everyone. But what those who have knowledge of Allaah and His commands are agreed upon is that constantly remembering Allaah (dhikr) is the best thing with which a person may occupy himself in general.
But what those who have knowledge of Allaah and His commands are agreed upon is that constantly remembering Allaah (dhikr) is the best thing with which a person may occupy himself in general.
Then in the end, the Shaykh (may Allaah have mercy on him) said,
ثُمَّ يَعْلَمُ أَنَّ كُلَّ مَا تَكَلَّمَ بِهِ اللِّسَانُ وَتَصَوَّرَهُ الْقَلْبُ مِمَّا يُقَرِّبُ إلَى اللَّهِ مِنْ تَعَلُّمِ عِلْمٍ وَتَعْلِيمِهِ وَأَمْرٍ بِمَعْرُوفِ وَنَهْيٍ عَنْ مُنْكَرٍ فَهُوَ مِنْ ذِكْرِ اللَّهِ.
وَلِهَذَا مَنْ اشْتَغَلَ بِطَلَبِ الْعِلْمِ النَّافِعِ بَعْدَ أَدَاءِ الْفَرَائِضِ أَوْ جَلَسَ مَجْلِسًا يَتَفَقَّهُ أَوْ يُفَقِّهُ فِيهِ الْفِقْهَ الَّذِي سَمَّاهُ اللَّهُ وَرَسُولُهُ فِقْهًا فَهَذَا أَيْضًا مِنْ أَفْضَلِ ذِكْرِ اللَّهِ.
وَعَلَى ذَلِكَ إذَا تَدَبَّرْت لَمْ تَجِدْ بَيْنَ الْأَوَّلِينَ فِي كَلِمَاتِهِمْ فِي أَفْضَلِ الْأَعْمَالِ كَبِيرَ اخْتِلَافٍ.
Moreover, one should realize that everything that the tongue utters or the heart imagines that may bring one closer to Allaah, such as seeking knowledge or teaching, enjoining what is good and forbidding what is evil, is a kind of dhikr or remembering Allaah.
Hence the one who occupies himself in the pursuit of beneficial knowledge after performing the obligatory duties, or who joins a gathering in order to learn or teach, which Allaah and His Messenger have called fiqh or understanding, is also doing something which is one of the best forms of remembering Allaah (dhikr).
If you think about it, you will not find much difference of opinion among the earliest generation concerning what is the best of deeds (after the obligatory duties).
Source: Majmoo’ al-Fataawa of Ibn Taymiyyah (may Allaah have mercy on him), Volume 10, pages 660-661.