كتاب الإمارة
33  
The Book on Government
(20)
Chapter: Swearing Allegiance and Pledging to adhere to Islam, to engage in Jihad and to do Good, after the conquest of Makkah, and the meaning of the phrase: "There is No Hijrah (migration) after the Conquest."
(20)
باب الْمُبَايَعَةِ بَعْدَ فَتْحِ مَكَّةَ عَلَى الإِسْلاَمِ وَالْجِهَادِ وَالْخَيْرِ وَبَيَانِ مَعْنَى: «لاَ هِجْرَةَ بَعْدَ الْفَتْحِ»
Sahih Muslim 1863 b

It has been reported on the authority of Mujashi' b. Mas'ud who said:

I brought my brother Abu Ma'bad to the Messenger of Allah (may peace he upon him) after the conquest of Mecca and said: Messenger of Allah, allow him to swear his pledge of migration at your hand. He said: The period of migration is over with those who had to do it (and now nobody can get this meritorious distinctions) I said: For what actions will you allow him to bind himself in oath? He said: (He can do so) for serving the cause of Islam, for fighting in the way of Allah and for fighting in the cause of virtue. Abd Uthman said: I met Abd Ma'bad and told him what I had heard from Mujashi'. He said: He has told the truth.
وَحَدَّثَنِي سُوَيْدُ بْنُ سَعِيدٍ، حَدَّثَنَا عَلِيُّ بْنُ مُسْهِرٍ، عَنْ عَاصِمٍ، عَنْ أَبِي عُثْمَانَ، قَالَ أَخْبَرَنِي مُجَاشِعُ بْنُ مَسْعُودٍ السُّلَمِيُّ، قَالَ جِئْتُ بِأَخِي أَبِي مَعْبَدٍ إِلَى رَسُولِ اللَّهِ صلى الله عليه وسلم بَعْدَ الْفَتْحِ فَقُلْتُ يَا رَسُولَ اللَّهِ بَايِعْهُ عَلَى الْهِجْرَةِ ‏.‏ قَالَ ‏"‏ قَدْ مَضَتِ الْهِجْرَةُ بِأَهْلِهَا ‏"‏ ‏.‏ قُلْتُ فَبِأَىِّ شَىْءٍ تُبَايِعُهُ قَالَ ‏"‏ عَلَى الإِسْلاَمِ وَالْجِهَادِ وَالْخَيْرِ ‏"‏ ‏.‏ قَالَ أَبُو عُثْمَانَ فَلَقِيتُ أَبَا مَعْبَدٍ فَأَخْبَرْتُهُ بِقَوْلِ مُجَاشِعٍ فَقَالَ صَدَقَ ‏.‏
Reference : Sahih Muslim 1863b
In-book reference : Book 33, Hadith 123
USC-MSA web (English) reference : Book 20, Hadith 4595
  (deprecated numbering scheme)