Studying the traditions reported with regard to fasting `Ashura‘, we find that the Prophet (peace and blessings be upon him) did not initiate the fasting of `Ashura’ in Madinah. Rather, he used to fast it before Hijrahand even Arab used to fast it. As regards the Prophet’s saying that Muslims are closer to Musa than the Jews are, this is meant to establish the significance of this day and to teach the Jews that Allah’s religion, propagated by all prophets and messengers, is one and the same.

Shedding more light on this issue , the eminent Muslim scholar, Sheikh Yusuf Al-Qaradawi, states the following:

The Hadith mentioned here is unanimously agreed upon. After the Hijrah when the Prophet (peace and blessings be upon him) came to Madinah, he found that the Jews of Madinah used to observe this day by fasting. The Prophet (peace and blessings be upon him) asked them the reason for their fast. They replied, “This is a blessed day. On this day Allah saved Musa and the Children of Israel from their enemy and so Prophet Musa fasted on this day (giving thanks to Allah).” The Prophet (peace and blessings be upon him) said, “I am closer to Musa than you are.” He fasted on that day and commanded the Muslims to fast on that day. (Reported by Al-Bukhari)
A Muslim may wonder why the Prophet observed fast on the same day as the Jews while he previously ordered the Muslims not to follow the non-Muslims. However, anyone who has carefully studied the Hadiths concerning the fasting of `Ashura’ will discover that the Prophet (peace and blessings be upon him) used to fast on this day even before he emigrated to Madinah. The Arabs before Islam used to fast on that day and glorified it, and it was the day they used to cover the Ka`bah. In doing so, they were following their predecessors. It is reported from `Ikrimah that Quraysh committed a sin in the Jahiliyah (pre-Islamic era) and they regretted it and were sorry, so they were advised to fast that day to expiate their sin.
Thus, the Prophet (beace be upon him) neither fasted `Ashura’ in accordance with the Jews nor did he started fasting it in Madinah. When He (peace and blessings be upon him) said, “We are closer to Musa than you are,”, and when he fasted and ordered the Muslims to fast on that day, he was, in fact, affirming the significance of this day and delivering a message to the Jews that Allah’s religion is one at all times. All the Prophets are brothers and each has contributed towards the establishment of the truth. Thus, The Muslims are more entitled to follow all the previous prophets more than those who claim adherence to the prophets while they falsified their books and altered their religion. So if the day of `Ashura’ celebrates the ill fate of Pharaoh and the victory of Musa, it is also a victory for the truth; the same truth that was revealed to Muhammad and upheld by him. Since Musa (peace and blessings be upon him) fasted this day as a way of thanksgiving, the Muslims are more entitled to follow him than the Jews.

Besides, it is to be born in mind that this agreement between the Muslims and the Jews in fasting this day occurred in the early days of Muslims in Madinah. The Prophet, in fact, liked to be in line with the People of the Book in non-prohibited matters in pursuit of attracting their hearts and winning them over to his cause. Later, when their hatred and animosity toward the Prophet and the Muslims were made manifest he ordered the Muslims not to follow them in their way of fasting. However, to keep the significance of the day, the Prophet said, “Observe fasting on the day of `Ashura’, but differ from the Jews and fast one day before it and one day after it.”(Musnad Ahmad)

This issue we are addressing here had actually confused the Companions of the Prophet themselves; though the Prophet was keen that the Muslims should not follow the Jews or the Christians, he observed fasting `Ashura’ and ordered them to observe it. So, they said to him, as reported by Ibn `Abbas, “O Messenger of Allah, this is a day that is glorified by the Jews and the Christians.” The Prophet (peace and blessings be upon him) said, “In the following year, Allah willing, I shall fast (also) on the 9th day.” (Muslim). But the Prophet passed away before the coming of the next year.

It can be concluded from this answer, and from other reports, that the Prophet (peace and blessings be upon him) made an additional day of fasting so as to differentiate between the way Muslims observe fasting on that day and the way of the Jews.

Ibn Al-Qayyim said that there are three categories of fasting the day of `Ashura’. The first is to fast three days, i.e. the day of `Ashura’, a day before it and a day after it. The second is to fast the ninth day and the day of `Ashura’. There are many Hadiths that referred to this category. The third is to fast on the day of `Ashura’ only.