I never saw the Prophet ﷺ perform a prayer outside its appointed time except on two occasions. He combined the Maghrib and Isha prayers, and he prayed Fajr before its usual time.
ما رأيت النبي ﷺ صلى صلاة بغير ميقاتها إلا صلاتين: جمع بين المغرب والعشاء، وصلى الفجر قبل ميقاتها.
Bukhari narrated it in the Hajj book (1682), and Muslim in the Hajj book (1289), both via Amash, who said, Umara (that is, Ibn Umayr Taymi) told me, from Abdul-Rahman bin Yazid (Nakhai), from Abdullah, and he related it, and their wordings are close to each other. Bukhari also narrated it at greater length (1683) via Abu Ishaq Sabi, from Abdul-Rahman bin Yazid Nakhai, who said, We set out with Abdullah to Makkah, then we arrived at Jamaa, and he prayed the two prayers, each prayer separately with its own adhan and iqama, with the Isha prayer between them, then he prayed Fajr when Fajr had broken. One person would say, Fajr has broken, and another would say, Fajr has not broken. Then he said, The Messenger of Allah ﷺ said, "These two prayers were shifted from their times in this place, Maghrib and Isha." So people should not arrive at Jamaa until they spend the night there, and this is the time for the Fajr prayer. Then he stood until it grew light, then said, If the Commander of the Faithful were to move on now, he would be following the sunnah. But I do not know whether his statement came quickly, or whether Uthman
moved on. He did not stop reciting the talbiyah until he cast the pebbles at Jamra Uqba on the Day of Sacrifice.His statement in the hadith, "and he prayed Fajr before its appointed time," does not mean that he performed the Fajr prayer before dawn had actually broken. Rather, he meant that it took place before the customary time at which it is performed while not traveling. See Fath al-Bari (3/525).