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:2686ʿUmar b. Ḥafṣ b. Ghiyāth from my father > al-Aʿmash > al-Shaʿbī > al-Nuʿmān b. Bashīr

The Prophet ﷺ said, "The example of the person abiding by Allah's orders and limits (or the one who abides by the limits and regulations prescribed by Allah) in comparison to the one who do wrong and violate Allah's limits and orders is like the example of people drawing lots for seats in a boat. Some of them got seats in the upper part while the others in the lower part ; those in the, lower part have to pass by those in the upper one to get water, and that troubled the latter. One of them (i.e. the people in the lower part) took an ax and started making a hole in the bottom of the boat. The people of the upper part came and asked him, (saying), 'What is wrong with you?' He replied, "You have been troubled much by my (coming up to you), and I have to get water.' Now if they prevent him from doing that they will save him and themselves, but if they leave him (to do what he wants), they will destroy him and themselves."  

البخاري:٢٦٨٦حَدَّثَنَا عُمَرُ بْنُ حَفْصِ بْنِ غِيَاثٍ حَدَّثَنَا أَبِي حَدَّثَنَا الأَعْمَشُ قَالَ حَدَّثَنِي الشَّعْبِيُّ أَنَّهُ سَمِعَ النُّعْمَانَ بْنَ بَشِيرٍ ؓ يَقُولُ

قَالَ النَّبِيُّ ﷺ مَثَلُ الْمُدْهِنِ فِي حُدُودِ اللَّهِ وَالْوَاقِعِ فِيهَا مَثَلُ قَوْمٍ اسْتَهَمُوا سَفِينَةً فَصَارَ بَعْضُهُمْ فِي أَسْفَلِهَا وَصَارَ بَعْضُهُمْ فِي أَعْلاَهَا فَكَانَ الَّذِي فِي أَسْفَلِهَا يَمُرُّونَ بِالْمَاءِ عَلَى الَّذِينَ فِي أَعْلاَهَا فَتَأَذَّوْا بِهِ فَأَخَذَ فَأْسًا فَجَعَلَ يَنْقُرُ أَسْفَلَ السَّفِينَةِ فَأَتَوْهُ فَقَالُوا مَا لَكَ قَالَ تَأَذَّيْتُمْ بِي وَلاَ بُدَّ لِي مِنَ الْمَاءِ فَإِنْ أَخَذُوا عَلَى يَدَيْهِ أَنْجَوْهُ وَنَجَّوْا أَنْفُسَهُمْ وَإِنْ تَرَكُوهُ أَهْلَكُوهُ وَأَهْلَكُوا أَنْفُسَهُمْ  


See similar narrations below:

Collected by Tirmidhī, Aḥmad
tirmidhi:2173Aḥmad b. Manīʿ > Abū Muʿāwiyah > al-Aʿmash > al-Shaʿbī > al-Nuʿmān b. Bashīr

"The parable of the one who upholds Allah's laws and the one who breaches them, is that of a people who drew lots on a ship at sea. Some of them got the upper part, and some of them the lower part. Those on the lower part ascended to get water, spilling it upon those upper part. So those in the upper part say: 'We will not leave you to come up here and bother us.' Then those on the lower part say: 'We should make a hole in the lower part, so we can get water.' If they take them by the hand and stop them, then they will save all of them, and if they leave them, they will all drown."'  

Abū ʿĪsá said that this Ḥadīth is Ḥasan-Ṣaḥīḥ.
الترمذي:٢١٧٣حَدَّثَنَا أَحْمَدُ بْنُ مَنِيعٍ حَدَّثَنَا أَبُو مُعَاوِيَةَ حَدَّثَنَا الأَعْمَشُ عَنِ الشَّعْبِيِّ عَنِ النُّعْمَانِ بْنِ بَشِيرٍ قَالَ

قَالَ رَسُولُ اللَّهِ ﷺ مَثَلُ الْقَائِمِ عَلَى حُدُودِ اللَّهِ وَالْمُدْهِنِ فِيهَا كَمَثَلِ قَوْمٍ اسْتَهَمُوا عَلَى سَفِينَةٍ فِي الْبَحْرِ فَأَصَابَ بَعْضُهُمْ أَعْلاَهَا وَأَصَابَ بَعْضُهُمْ أَسْفَلَهَا فَكَانَ الَّذِينَ فِي أَسْفَلِهَا يَصْعَدُونَ فَيَسْتَقُونَ الْمَاءَ فَيَصُبُّونَ عَلَى الَّذِينَ فِي أَعْلاَهَا فَقَالَ الَّذِينَ فِي أَعْلاَهَا لاَ نَدَعُكُمْ تَصْعَدُونَ فَتُؤْذُونَنَا فَقَالَ الَّذِينَ فِي أَسْفَلِهَا فَإِنَّا نَنْقُبُهَا مِنْ أَسْفَلِهَا فَنَسْتَقِي فَإِنْ أَخَذُوا عَلَى أَيْدِيهِمْ فَمَنَعُوهُمْ نَجَوْا جَمِيعًا وَإِنْ تَرَكُوهُمْ غَرِقُوا جَمِيعًا  

قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ
ahmad:18361Abū Muʿāwiyah > al-Aʿmash > al-Shaʿbī > al-Nuʿmān b. Bashīr

"The parable of the one who upholds Allah's laws and the one who breaches them, is that of a people who drew lots on a ship at sea. Some of them got the upper part, and some of them the lower part. Those on the lower part ascended to get water, spilling it upon those upper part. So those in the upper part say: 'We will not leave you to come up here and bother us.' Then those on the lower part say: 'We should make a hole in the lower part, so we can get water.' If they take them by the hand and stop them, then they will save all of them, and if they leave them, they will all drown."' (Using translation from Tirmidhī 2173)  

أحمد:١٨٣٦١حَدَّثَنَا أَبُو مُعَاوِيَةَ حَدَّثَنَا الْأَعْمَشُ عَنِ الشَّعْبِيِّ عَنِ النُّعْمَانِ بْنِ بَشِيرٍ قَالَ

قَالَ رَسُولُ اللهِ ﷺ مَثَلُ الْقَائِمِ عَلَى حُدُودِ اللهِ وَالْمُدَّهِنِ فِيهَا كَمَثَلِ قَوْمٍ اسْتَهَمُوا عَلَى سَفِينَةٍ فِي الْبَحْرِ فَأَصَابَ بَعْضُهُمْ أَسْفَلَهَا وَأَصَابَ بَعْضُهُمْ أَعْلَاهَا فَكَانَ الَّذِينَ فِي أَسْفَلِهَا يَصْعَدُونَ فَيَسْتَقُونَ الْمَاءَ فَيَصُبُّونَ عَلَى الَّذِينَ فِي أَعْلَاهَا فَقَالَ الَّذِينَ فِي أَعْلَاهَا لَا نَدَعُكُمْ تَصْعَدُونَ فَتُؤْذُونَنَا فَقَالَ الَّذِينَ فِي أَسْفَلِهَا فَإِنَّنَا نَنْقُبُهَا مِنْ أَسْفَلِهَا فَنَسْتَقِي قَالَ فَإِنْ أَخَذُوا عَلَى أَيْدِيهِمْ فَمَنَعُوهُمْ نَجَوْا جَمِيعًا وَإِنْ تَرَكُوهُمْ غَرِقُوا جَمِيعًا