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.
abudawud:13Muḥammad b. Bashhār > Wahbb. Jarīr from my father > Muḥammad b. Isḥāq > Abān b. Ṣāliḥ > Mujāhid > Jābir b. ʿAbdullāh > Nahá Nabī Allāh ﷺ > Nastaqbil al-Qiblah Bibawl Faraʾaytuh Qabl

The Prophet of Allah ﷺ forbade us to face the qiblah at the time of making water. Then I saw him facing it (qiblah) urinating or easing himself one year before his death.  

أبو داود:١٣حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ حَدَّثَنَا وَهْبُ بْنُ جَرِيرٍ حَدَّثَنَا أَبِي قَالَ سَمِعْتُ مُحَمَّدَ بْنَ إِسْحَاقَ يُحَدِّثُ عَنْ أَبَانَ بْنِ صَالِحٍ عَنْ مُجَاهِدٍ عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ قَالَ

نَهَى نَبِيُّ اللَّهِ ﷺ أَنْ نَسْتَقْبِلَ الْقِبْلَةَ بِبَوْلٍ فَرَأَيْتُهُ قَبْلَ أَنْ يُقْبَضَ بِعَامٍ يَسْتَقْبِلُهَا  


See similar narrations below:

Collected by Tirmidhī, Ibn Mājah
tirmidhi:9Muḥammad b. Bashhār And Muḥammad b. al-Muthanná > Wahb b. Jarīr from my father > Muḥammad b. Isḥāq > Abān b. Ṣāliḥ > Mujāhid > Jābir b. ʿAbdullāh

"The Prophet prohibited us from facing the Qiblah while urinating. Then i saw him facing it a year before he died."  

الترمذي:٩حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ وَمُحَمَّدُ بْنُ الْمُثَنَّى قَالاَ حَدَّثَنَا وَهْبُ بْنُ جَرِيرٍ حَدَّثَنَا أَبِي عَنْ مُحَمَّدِ بْنِ إِسْحَاقَ عَنْ أَبَانَ بْنِ صَالِحٍ عَنْ مُجَاهِدٍ عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ قَالَ

نَهَى النَّبِيُّ ﷺ أَنْ نَسْتَقْبِلَ الْقِبْلَةَ بِبَوْلٍ فَرَأَيْتُهُ قَبْلَ أَنْ يُقْبَضَ بِعَامٍ يَسْتَقْبِلُهَا وَفِي الْبَابِ عَنْ أَبِي قَتَادَةَ وَعَائِشَةَ وَعَمَّارِ بْنِ يَاسِرٍ  

قَالَ أَبُو عِيسَى حَدِيثُ جَابِرٍ فِي هَذَا الْبَابِ حَدِيثٌ حَسَنٌ غَرِيبٌ
ibnmajah:325Muḥammad b. Bashhār > Wahbb. Jarīr from my father > Muḥammad b. Isḥāq > Abān b. Ṣāliḥ > Mujāhid > Jābir

"The Messenger of Allah forbade facing the Qiblah when urinating. But I saw him, one year before he died, facing the Qiblah (while urinating)."  

ابن ماجة:٣٢٥حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ حَدَّثَنَا وَهْبُ بْنُ جَرِيرٍ حَدَّثَنَا أَبِي قَالَ سَمِعْتُ مُحَمَّدَ بْنَ إِسْحَاقَ عَنْ أَبَانَ بْنِ صَالِحٍ عَنْ مُجَاهِدٍ عَنْ جَابِرٍ قَالَ

نَهَى رَسُولُ اللَّهِ ﷺ أَنْ نَسْتَقْبِلَ الْقِبْلَةَ بِبَوْلٍ فَرَأَيْتُهُ قَبْلَ أَنْ يُقْبَضَ بِعَامٍ يَسْتَقْبِلُهَا