Ayesha reported,

The day of Ashura was a day that Quraysh used to fast during the days of ignorance, and the Messenger of Allah ﷺ used to fast it then as well. When the Messenger of Allah ﷺ arrived in Medina, he fasted it and ordered others to fast it. When the fast of Ramadan was made obligatory, that became the obligation, and Ashura was left optional. Whoever wished could fast it, and whoever wished could leave it.

Abu Dawud 2442

Sahih

حدثنا عبد الله بن مسلمة عن مالك عن هشام بن عروة عن أبيه

عن عائشة رضي الله عنها قالت

كان يوم عاشوراء يوما تصومه قريش في الجاهلية وكان رسول الله ﷺ يصومه في الجاهلية فلما قدم رسول الله ﷺ المدينة صامه وأمر بصيامه فلما فرض رمضان كان هو الفريضة وترك عاشوراء فمن شاء صامه ومن شاء تركه

أبو داود 2442صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Fasting
Chapter
Fasting on the day of Ashura
Numbering
Darussalam 2442
Abu Dawud 2442