Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:2961Ḥafṣ b. ʿUmar > Shuʿbah > Ḥumayd > Anas > Kānat al-Anṣār Yawm al-Khandaq

On the day (of the battle) of the Trench, the Ansar were saying, "We are those who have sworn allegiance to Muhammad for Jihaid (for ever) as long as we live." The Prophet ﷺ replied to them, "O Allah! There is no life except the life of the Hereafter. So honor the Ansar and emigrants with Your Generosity."  

البخاري:٢٩٦١حَدَّثَنَا حَفْصُ بْنُ عُمَرَ حَدَّثَنَا شُعْبَةُ عَنْ حُمَيْدٍ قَالَ سَمِعْتُ أَنَسًا ؓ يَقُولُ

كَانَتِ الأَنْصَارُ يَوْمَ الْخَنْدَقِ تَقُولُ نَحْنُ الَّذِينَ بَايَعُوا مُحَمَّدَا عَلَى الْجِهَادِ مَا حَيِينَا أَبَدَا فَأَجَابَهُمُ النَّبِيُّ ﷺ فَقَالَ: «اللَّهُمَّ لاَ عَيْشَ إِلاَّ عَيْشُ الآخِرَهْ، فَأَكْرِمِ الأَنْصَارَ وَالْمُهَاجِرَهْ۔»  


See similar narrations below:

Collected by Bukhārī, Aḥmad, Nasāʾī's Kubrá
bukhari:3796Ādam > Shuʿbah > Ḥumayd al-Ṭawīl > Anas b. Mālik > Kānat al-Anṣār Yawm al-Khandaq

On the day of the battle of the Trench (i.e. Ghazwat-ul-Khandaq) the Ansar used to say, "We are those who have given the pledge of allegiance to Muhammad for Jihad (i.e. holy fighting) as long as we live." The Prophet ﷺ , replied to them, "O Allah! There is no life except the life of the Hereafter; so please honor the Ansar and the Emigrants."  

البخاري:٣٧٩٦حَدَّثَنَا آدَمُ حَدَّثَنَا شُعْبَةُ عَنْ حُمَيْدٍ الطَّوِيلِ سَمِعْتُ أَنَسَ بْنَ مَالِكٍ ؓ قَالَ

كَانَتِ الأَنْصَارُ يَوْمَ الْخَنْدَقِ تَقُولُ نَحْنُ الَّذِينَ بَايَعُوا مُحَمَّدَا عَلَى الْجِهَادِ مَا حَيِينَا أَبَدَا فَأَجَابَهُمُ اللَّهُمَّ لاَ عَيْشَ إِلاَّ عَيْشُ الآخِرَهْ فَأَكْرِمِ الأَنْصَارَ وَالْمُهَاجِرَهْ  

ahmad:12732Muḥammad b. Jaʿfar > Shuʿbah > Ḥumayd > Anas b. Mālik

[Machine] The Ansar said, "We are the ones who pledged allegiance to Muhammad for jihad, and we will never cease to exist." The Messenger of Allah ﷺ replied, "O Allah, the best is the best in the hereafter. So forgive the Ansar and the Muhajireen."  

أحمد:١٢٧٣٢حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ حَدَّثَنَا شُعْبَةُ عَنْ حُمَيْدٍ قَالَ سَمِعْتُ أَنَسَ بْنَ مَالِكٍ قَالَ

قَالَتِ الْأَنْصَارُ نَحْنُ الَّذِينَ بَايَعُوا مُحَمَّدَا عَلَى الْجِهَادِ مَا بَقِينَا أَبَدَا فَأَجَابَهُمْ رَسُولُ اللهِ ﷺ اللهُمَّ إِنَّ الْخَيْرَ خَيْرُ الْآخِرَهْ فَاغْفِرْ لِلْأَنْصَارِ وَالْمُهَاجِرَهْ  

nasai-kubra:8258Aḥmad b. Sulaymān > Miskīn b. Bukayr > Shuʿbah > Ḥumayd al-Ṭawīl > Anas > Kānat al-Anṣār

On the day (of the battle) of the Trench, the Ansar were saying, "We are those who have sworn allegiance to Muhammad for Jihaid (for ever) as long as we live." The Prophet ﷺ replied to them, "O Allah! There is no life except the life of the Hereafter. So honor the Ansar and emigrants with Your Generosity." (Using translation from Bukhārī 2961)   

الكبرى للنسائي:٨٢٥٨أَخْبَرَنَا أَحْمَدُ بْنُ سُلَيْمَانَ قَالَ حَدَّثَنَا مِسْكِينُ بْنُ بُكَيْرٍ قَالَ حَدَّثَنَا شُعْبَةُ عَنْ حُمَيْدٍ الطَّوِيلِ عَنْ أَنَسٍ قَالَ

كَانَتِ الْأَنْصَارُ تَقُولُ يَوْمَ الْخَنْدَقِ [البحر الرجز] نَحْنُ الَّذِينَ بَايَعُوا مُحَمَّدَا عَلَى الْجِهَادِ مَا حَيِينَا أَبَدَا فَأَجَابَهُمُ النَّبِيُّ ﷺ «اللهُمَّ لَا عَيْشَ إِلَّا عَيْشُ الْآخِرَةِ فَاغْفِرْ لِلْأَنْصَارِ وَالْمُهَاجِرَةِ»