كتاب الصلاة
4  
The Book of Prayers
(25)
Chapter: The Prohibition Of Preceding The Imam While Bowing, Prostrating And So On
(25)
باب النَّهْىِ عَنْ سَبْقِ الإِمَامِ، بِرُكُوعٍ أَوْ سُجُودٍ وَنَحْوِهِمَا ‏
Sahih Muslim 427 a

Abu Huraira reported:

The Messenger of Allah (ﷺ) said: Does the man who lifts his head ahead of the Imam (from prostration) not fear that Allah may change his head into the head of an ass?
حَدَّثَنَا خَلَفُ بْنُ هِشَامٍ، وَأَبُو الرَّبِيعِ الزَّهْرَانِيُّ، وَقُتَيْبَةُ بْنُ سَعِيدٍ، كُلُّهُمْ عَنْ حَمَّادٍ، - قَالَ خَلَفٌ حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، - عَنْ مُحَمَّدِ بْنِ زِيَادٍ، حَدَّثَنَا أَبُو هُرَيْرَةَ، قَالَ قَالَ مُحَمَّدٌ صلى الله عليه وسلم ‏ "‏ أَمَا يَخْشَى الَّذِي يَرْفَعُ رَأْسَهُ قَبْلَ الإِمَامِ أَنْ يُحَوِّلَ اللَّهُ رَأْسَهُ رَأْسَ حِمَارٍ ‏"‏ ‏.‏
Reference : Sahih Muslim 427a
In-book reference : Book 4, Hadith 125
USC-MSA web (English) reference : Book 4, Hadith 859
  (deprecated numbering scheme)