The Messenger of Allah ﷺ used to order people to fast on this day before fasting in Ramadan was made obligatory. Once Ramadan was made obligatory, whoever wished fasted on the day of Ashura, and whoever wished did not.
حدثنا حرملة بن يحيى أخبرنا ابن وهب أخبرني يونس عن ابن شهاب أخبرني عروة بن الزبير أن
كان رسول الله ﷺ يأمر بصيامه قبل أن يفرض رمضان فلما فرض رمضان كان من شاء صام يوم عاشوراء ومن شاء أفطر