Abdullah bin Abbas reported,

When the Prophet ﷺ arrived in Medina, he found them fasting on a particular day, namely Ashura. They said, "This is a great day. It is the day on which Allah saved Musa and drowned the people of Pharaoh, so Musa fasted it in gratitude to Allah."He said, "I have more right to Musa than they do." So he fasted it and ordered that it be fasted.

Bukhari 3397

Sahih

حدثنا علي بن عبد الله حدثنا سفيان حدثنا أيوب السختياني عن ابن سعيد بن جبير عن أبيه

عن ابن عباس رضي الله عنهما

أن النبي ﷺ لما قدم المدينة وجدهم يصومون يوما يعني عاشوراء فقالوا هذا يوم عظيم وهو يوم نجى الله فيه موسى وأغرق آل فرعون فصام موسى شكرا لله فقال أنا أولى بموسى منهم فصامه وأمر بصيامه

البخاري 3397صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Hadiths of the prophets
Chapter
Allah's saying, "And has there reached you the story of Musa?" and "Allah spoke to Musa directly"
Numbering
Darussalam 3397
Bukhari 3397