كتاب التفسير
65  
Prophetic Commentary on the Qur'an (Tafseer of the Prophet (pbuh))
(24)
“O you who believe! Observing As-Saum (the fasting) is prescribed for you as it was prescribed for those before you that you, may become Al- Muttaqun (V.2:183).
(24)
Sahih al-Bukhari 4504

Narrated Aisha:

During the Pre-lslamic Period of ignorance the Quraish used to observe fasting on the day of 'Ashura', and the Prophet (ﷺ) himself used to observe fasting on it too. But when he came to Medina, he fasted on that day and ordered the Muslims to fast on it. When (the order of compulsory fasting in ) Ramadan was revealed, fasting in Ramadan became an obligation, and fasting on 'Ashura' was given up, and who ever wished to fast (on it) did so, and whoever did not wish to fast on it, did not fast.

حَدَّثَنِي مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا يَحْيَى، حَدَّثَنَا هِشَامٌ، قَالَ أَخْبَرَنِي أَبِي، عَنْ عَائِشَةَ ـ رضى الله عنها ـ قَالَتْ كَانَ يَوْمُ عَاشُورَاءَ تَصُومُهُ قُرَيْشٌ فِي الْجَاهِلِيَّةِ، وَكَانَ النَّبِيُّ صلى الله عليه وسلم يَصُومُهُ، فَلَمَّا قَدِمَ الْمَدِينَةَ صَامَهُ وَأَمَرَ بِصِيَامِهِ، فَلَمَّا نَزَلَ رَمَضَانُ كَانَ رَمَضَانُ الْفَرِيضَةَ، وَتُرِكَ عَاشُورَاءُ، فَكَانَ مَنْ شَاءَ صَامَهُ، وَمَنْ شَاءَ لَمْ يَصُمْهُ‏.‏
Reference : Sahih al-Bukhari 4504
In-book reference : Book 65, Hadith 31
USC-MSA web (English) reference : Vol. 6, Book 60, Hadith 31
  (deprecated numbering scheme)