كتاب المغازى
64  
Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi)
(61)
Chapter: Sending 'Ali and Khalid رضي الله عنهما to Yemen
(61)
باب بَعْثُ عَلِيِّ بْنِ أَبِي طَالِبٍ ـ عَلَيْهِ السَّلاَمُ ـ وَخَالِدِ بْنِ الْوَلِيدِ ـ رضى الله عنه ـ إِلَى الْيَمَنِ قَبْلَ حَجَّةِ الْوَدَاعِ
Sahih al-Bukhari 4352

Narrated 'Ata:

Jabir said, "The Prophet (ﷺ) ordered `Ali to keep the state of Ihram." Jabir added, "Ali bin Abi Talib returned (from Yemen) when he was a governor (of Yemen). The Prophet (ﷺ) said to him, 'With what intention have you assumed the state of Ihram?' `Ali said, "I have assumed Ihram with an intention as that of the Prophet." Then the Prophet (ﷺ) said (to him), 'Offer a Hadi and keep the state of Ihram in which you are now.' `Ali slaughtered a Hadi on his behalf."

حَدَّثَنَا الْمَكِّيُّ بْنُ إِبْرَاهِيمَ، عَنِ ابْنِ جُرَيْجٍ، قَالَ عَطَاءٌ قَالَ جَابِرٌ أَمَرَ النَّبِيُّ صلى الله عليه وسلم عَلِيًّا أَنْ يُقِيمَ عَلَى إِحْرَامِهِ‏.‏ زَادَ مُحَمَّدُ بْنُ بَكْرٍ عَنِ ابْنِ جُرَيْجٍ، قَالَ عَطَاءٌ قَالَ جَابِرٌ فَقَدِمَ عَلِيُّ بْنُ أَبِي طَالِبٍ رضى الله عنه بِسِعَايَتِهِ، قَالَ لَهُ النَّبِيُّ صلى الله عليه وسلم ‏"‏ بِمَ أَهْلَلْتَ يَا عَلِيُّ ‏"‏‏.‏ قَالَ بِمَا أَهَلَّ بِهِ النَّبِيُّ صلى الله عليه وسلم قَالَ ‏"‏ فَأَهْدِ وَامْكُثْ حَرَامًا كَمَا أَنْتَ ‏"‏‏.‏ قَالَ وَأَهْدَى لَهُ عَلِيٌّ هَدْيًا‏.‏
Reference : Sahih al-Bukhari 4352
In-book reference : Book 64, Hadith 379
USC-MSA web (English) reference : Vol. 5, Book 59, Hadith 639
  (deprecated numbering scheme)