first of all, it is very important to make it clear that fasting on the day of `ashura’ – the 10th of muharram- is of great merits in islam. the prophet (peace and blessings be upon him) said, “fasting the day of `ashura' (is of great merits), i hope that allah will accept it as an expiation for (the sins committed in) the previous year” (muslim).
also, fasting the 9th of muharram is highly recommended by the sunnah. imam at-tirmidhi reported that ibn `abbas (may allah be pleased with them both) used to say: we should fast on two days: the 9th and 10th of muharram to distinguish ourselves from the jewish community. (at-tirmidhi)
explaining the virtue of fasting on the 9th and the 10th of muharram, dr. muzammil h. siddiqi, former president of the islamic society of north america, states:
it is the sunnah of the prophet (peace and blessings be upon him) to fast on the 9th and 10th of muharram. the prophet (peace and blessings be upon him used to fast on the day of `ashura'. when he came to madinah, he found out that the jews of madinah were also fasting on this day remembering prophet musa (peace and blessings be upon him). the prophet (peace and blessings be upon him) admired this tradition and said to the jews, "i am closer to musa than you are." he fasted and he also told his companions to fast on this day.
later, before the end of his life, the prophet (peace and blessings be upon him) told muslims to add the 9th day also. thus, it is recommended to fast on both the 9th and 10th of muharram.
moreover, in his well-known book, fiqh as-sunnah, the late sheikh sayyed sabiq states:
abu hurayrah reported: "i asked the prophet: 'which prayer is the best after the obligatory prayers?' he said: 'prayer during the mid of the night.' i asked: 'which fasting is the best after that of ramadan?' he said, 'the month of allah that you call muharram’" (ahmad, muslim, and abu dawud).
mu`awiyyah ibn abi sufyan reported that he heard the messenger of allah say: "concerning the day of `ashura’, it is not obligatory upon you to fast on it as i do. whoever wishes may fast and whoever does not wish to is not obliged to do so" (al-bukhari and muslim).
it is noteworthy that muslim scholars have stated that fasting of `ashura’ is of three levels as follows:
1. fasting for three days, i.e., on the 9th, 10th, and 11th of muharram,
2. fasting the 9th and 10th of muharram, and
3. fasting only the 10th of muharram.