"Maimonides establishes beyond the shadow of any halachic doubt that a great Jewish leader who causes the Jewish people to reembrace their tradition and fights God's moral battles - feats the Rebbe accomplished without rival - has the possibility of being the Messiah. But if he dies without having fulfilled the relevant prophecies, he is seen as an inspired leader who brought the world closer to redemption, but is not the redeemer himself."I added the bolding there. This is important because, while he does, to my reading, clearly reject the idea that the Lubavitcher Rebbe, having died, is still the mashiach, he still considers him to have fulfilled Rambam's criteria for being bechezkat mashiach.
But this involves taking Rambam's words metaphorically, much as the meshichists take the continuation of Rambam's words metaphorically.
Rambam, in Mishneh Torah, hilchot melachim, perek 11, writes:
ח [ד] ואם יעמוד מלך מבית דויד הוגה בתורה ועוסק במצוות כדויד אביו, כפי תורה שבכתב ושבעל פה, ויכוף כל ישראל לילך בה ולחזק בדקה, ויילחם מלחמות ה'--הרי זה בחזקת שהוא משיח: אם עשה והצליח, וניצח כל האומות שסביביו, ובנה מקדש במקומו, וקיבץ נדחי ישראל--הרי זה משיח בוודאי.
ט ואם לא הצליח עד כה, או נהרג--בידוע שאינו זה שהבטיחה עליו תורה, והרי הוא ככל מלכי בית דויד השלמים הכשרים שמתו. ולא העמידו הקדוש ברוך הוא אלא לנסות בו רבים, שנאמר "ומן המשכילים ייכשלו, לצרוף בהן ולברר וללבן--עד עת קץ: כי עוד, למועד" (ראה דנייאל יא,לה).
But saying that the Rebbe fought God's moral battles, and therefore Rambam's criteria for someone who is bechezkat mashiach were "feats the Rebbe accomplished without rival" also seems to me to be taking Rambam's words metaphorically. Again, in 8, we have:
The hatzlacha here seems to be in conquering the surrounding nations. And this עשה is fighting the battles of God. Thus, it seems to be meant literally, rather than metaphorical moral battles. Indeed, continuing in 9, we read:
Thus, this is failure to fulfill the conditions of being the vadai moshiach, and that really seems to be the context of neherag here -- that he was killed in battle.
As some commentators note, Rambam seems to be basing his idea of mashiach as a physical redemption within the rules of derech hateva, but without subjugation of the nations -- like Bar Kochba had he succeeded. This idea of physical, rather than moral battles, seems a part of that.
Indeed, Rav Moshe Feinstein in Igros Moshe (look up ויילחם מלחמות) considers this as a potential proof that the people of Israel will be weapons in the time of Moshiach, but then answers that the wars will be fought miraculously. But he does not think that it means metaphorically!
The Rambam has a famous statement that (certain) midrashim are meant to be taken figuratively. Some understand that he meant this to refer to all midrash aggada. I am still unconvinced of this fact, but regardless, he is a basis in modern times for regarding every midrash aggadah to be allegorical, and anyone who thinks otherwise to be a fool.
Now, others argue with the Rambam on this, and the Rambam is not the final word on the subject.
And I think that it is a very dangerous approach to take, since, if you disagree with Chazal about something, you no longer have to worry about contradiction. Just "reinterpret" Chazal's words, so that it is not disagreement, but rather they are in reinforcing your opinion. Or else they are talking about something completely different.
Now Rambam is in the odd position of having people do exactly that to his own words, in Mishneh Torah.