Language:
كتاب التقصير
18  
Shortening the Prayers (At-Taqseer)
(10)
Chapter: To offer the Nawafil while riding a donkey
(10)
باب صَلاَةِ التَّطَوُّعِ عَلَى الْحِمَارِ
Sahih al-Bukhari 1100

Narrated Anas bin Seereen:

We went to receive Anas bin Malik when he returned from Sham and met him at a place called 'Ainat- Tamr. I saw him praying riding the donkey, with his face to this direction, i.e. to the left of the Qibla. I said to him, "I have seen you offering the prayer in a direction other than that of the Qibla." He replied, "If I had not seen Allah's Messenger (ﷺ) doing it, I would not have done it."

حَدَّثَنَا أَحْمَدُ بْنُ سَعِيدٍ، قَالَ حَدَّثَنَا حَبَّانُ، قَالَ حَدَّثَنَا هَمَّامٌ، قَالَ حَدَّثَنَا أَنَسُ بْنُ سِيرِينَ، قَالَ اسْتَقْبَلْنَا أَنَسًا حِينَ قَدِمَ مِنَ الشَّأْمِ، فَلَقِينَاهُ بِعَيْنِ التَّمْرِ، فَرَأَيْتُهُ يُصَلِّي عَلَى حِمَارٍ وَوَجْهُهُ مِنْ ذَا الْجَانِبِ، يَعْنِي عَنْ يَسَارِ الْقِبْلَةِ‏.‏ فَقُلْتُ رَأَيْتُكَ تُصَلِّي لِغَيْرِ الْقِبْلَةِ‏.‏ فَقَالَ لَوْلاَ أَنِّي رَأَيْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم فَعَلَهُ لَمْ أَفْعَلْهُ‏.‏ رَوَاهُ ابْنُ طَهْمَانَ عَنْ حَجَّاجٍ عَنْ أَنَسِ بْنِ سِيرِينَ عَنْ أَنَسٍ ـ رضى الله عنه ـ عَنِ النَّبِيِّ صلى الله عليه وسلم‏.‏
Reference : Sahih al-Bukhari 1100
In-book reference : Book 18, Hadith 20
USC-MSA web (English) reference : Vol. 2, Book 20, Hadith 204
  (deprecated numbering scheme)