A Commentary of the Hadeeth: "You are unto me as Haaroon was unto Moosaa."
On the authrority of Sa'd Ibn Abi Waqqaas رضي الله عنه, that the Messenger of Allaah صلى الله عليه وسلم said to 'Ali Ibn Abi Taalib رضي الله عنه: "You are unto me as Haaroon was unto Moosaa, except that there will be no Prophet after me." 
The narration of Ahmad on the authority of Sa'eed Ibn al-Musayyib has it that 'Ali رضي الله عنه replied: "I am content, I am content!"
Ibn Sa'd narrates essentially the same story on the authority of al-Baraa' رضي الله عنه and Zayd Ibn Arqam رضي الله عنه, who reported that 'Ali's رضي الله عنه reply was, "Indeed, O Messenger of Allaah,' to which the Prophet صلى الله عليه وسلم said, "It is indeed so."
They also mention at the beginning of their report that the Prophet صلى الله عليه وسلم said, "Either I or you must stay behind." 'Ali رضي الله عنه stayed behind and heard people saying, "He has only left him behind because he dislikes something about him." 'Ali رضي الله عنه followed the Prophet صلى الله عليه وسلم and related this to him; and then the hadeeth proceeds in the same way. The chain of this version is strong.
Imaam Al-Qaadee 'Iyaad رحمه الله said,
"This hadeeth is one of those which the Rawaafid, the Imaamiyyah and other Shi'ah sects cite as proof that the caliphate was rightfully Ali's رضي الله عنه, and that the Prophet صلى الله عليه وسلم named him as his successor. Then these factions differed: the Rawaafid declared that all the other Companions رضي الله عنهم were unbelievers because they upheld the caliphate of other than 'Ali رضي الله عنه while some of them even went as far as to declare 'Ali رضي الله عنه an unbeliever for failing to claim what was 'rightfully his' as they saw it. Such an opinion is too stupid and ridiculous to even require rebuttal or debate. There is no doubt that whoever holds this opinion is an unbeliever, because to charge the whole Ummah and the first generation of Muslims with unbelief is to do away with the transmission of the Sacred Law, and ultimately to destroy Islaam itself.
Now besided these extremists, the other Shi'ah sects do not follow this path. The Imaamiyyah, and some of the Mu'tazilah, say that the Companions رضي الله عنهم were wrong to prefer other than 'Ali رضي الله عنه, but not unbelievers on account of it. Some of the Mu'tazilah do not even say it was wrong, since they hold that it is permissible to prefer a supposedly lesser person for the caliphate.
In any case, this hadeeth is not a supporting evidence for any of them. All it does is affirm a virtue of 'Ali, and does not in any way suggest that he was better than anyone else. Nor does it prove that the Prophet صلى الله عليه وسلم named 'Ali رضي الله عنه as his successor, since the Prophet صلى الله عليه وسلم said these words when he left 'Ali رضي الله عنه in charge of Madeenah during the Campaign of Tabook. This is supported by the fact that Haaroon عليه السلام, the object of the comparison, did not succeed Moosaa after him but actually passed away forty years before Moosaa عليه السلام did according to the dominant opinion of the historians. They also say that Moosaa عليه السلام only left Haaroon عليه السلام in charge while he went to meet his Lord to engage in intimate discourse with Him. Allaah knows best.
The scholars also say that this hadeeth proves that when Prophet 'Eesaa Ibn Maryam عليه السلام (Jesus the son of Mary) returns to this world at the end of time, he will return as a ruler of this community and will rule according to the Law of our Prophet Muhammad صلى الله عليه وسلم. He will not return as a Prophet." 
Imaam Ibn Hajar al-'Asqalaani رحمه الله said,
"Some have cited this hadeeth as evidence that 'Ali رضي الله عنه was more deserving of the caliphate than any other Companion, since Haaroon عليه السلام was Moosaa's عليه السلام vicegerant. The response to this is that Haaroon عليه السلام was only Moosaa's عليه السلام vicegerant in Moosaa's عليه السلام lifetime and not after his death, since all are agreed that he died before Moosaa عليه السلام. Al-Khattaabi pointed this out. At-Tayyibi said that the meaning of this hadeeth is, ''Ali is connected to me just as Haaroon was to Moosa.' If this is ambiguous, it is clarified by what he said next: 'Except that there shall be no Prophet after me.' This tells us that the connection between them did not pertain to prophethood but to a lower level, namely vicegerancy; and since Haaroon عليه السلام, the object of the comparison, was only vicegerant during the lifetime of Moosaa عليه السلام, this means that 'Ali's رضي الله عنه vicegerancy was also limited to the lifetime of the Prophet صلى الله عليه وسلم. Allaah knows best." 
 Saheeh Muslim
 Imaam an-Nawawi رحمه الله, Sharh Saheeh Muslim
 Imaam Ibn Hajar رحمه الله, Sharh Saheeh al-Bukhaari