Language:
كتاب الفتن
92  
Afflictions and the End of the World
(21)
Chapter: Changing the words
(21)
باب إِذَا قَالَ عِنْدَ قَوْمٍ شَيْئًا ثُمَّ خَرَجَ فَقَالَ بِخِلاَفِهِ
Sahih al-Bukhari 7111

Narrated Nafi`:

When the people of Medina dethroned Yazid bin Muawiya, Ibn `Umar gathered his special friends and children and said, "I heard the Prophet (ﷺ) saying, 'A flag will be fixed for every betrayer on the Day of Resurrection,' and we have given the oath of allegiance to this person (Yazid) in accordance with the conditions enjoined by Allah and His Apostle and I do not know of anything more faithless than fighting a person who has been given the oath of allegiance in accordance with the conditions enjoined by Allah and His Apostle , and if ever I learn that any person among you has agreed to dethrone Yazid, by giving the oath of allegiance (to somebody else) then there will be separation between him and me."

حَدَّثَنَا سُلَيْمَانُ بْنُ حَرْبٍ، حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، عَنْ أَيُّوبَ، عَنْ نَافِعٍ، قَالَ لَمَّا خَلَعَ أَهْلُ الْمَدِينَةِ يَزِيدَ بْنَ مُعَاوِيَةَ جَمَعَ ابْنُ عُمَرَ حَشَمَهُ وَوَلَدَهُ فَقَالَ إِنِّي سَمِعْتُ النَّبِيَّ صلى الله عليه وسلم يَقُولُ ‏ "‏ يُنْصَبُ لِكُلِّ غَادِرٍ لِوَاءٌ يَوْمَ الْقِيَامَةِ ‏"‏‏.‏ وَإِنَّا قَدْ بَايَعْنَا هَذَا الرَّجُلَ عَلَى بَيْعِ اللَّهِ وَرَسُولِهِ، وَإِنِّي لاَ أَعْلَمُ غَدْرًا أَعْظَمَ مِنْ أَنْ يُبَايَعَ رَجُلٌ عَلَى بَيْعِ اللَّهِ وَرَسُولِهِ، ثُمَّ يُنْصَبُ لَهُ الْقِتَالُ، وَإِنِّي لاَ أَعْلَمُ أَحَدًا مِنْكُمْ خَلَعَهُ، وَلاَ بَايَعَ فِي هَذَا الأَمْرِ، إِلاَّ كَانَتِ الْفَيْصَلَ بَيْنِي وَبَيْنَهُ‏.‏
Reference : Sahih al-Bukhari 7111
In-book reference : Book 92, Hadith 58
USC-MSA web (English) reference : Vol. 9, Book 88, Hadith 227
  (deprecated numbering scheme)