The Rambam's (Maimonides) Laws of Kings is the only source in Jewish law on the identity of Moshiach and the criteria he must fulfill. The Rebbe said the following:
"In the end of Laws of Kings the Rambam writes, 'The King Moshiach will arise... and whoever does not believe in him or does not await his coming is not only denying the other Prophets but the Torah and Moshe Rabbeinu as well.' The Rambam continues to explain a few more details regarding King Moshiach and the condition of the world in the days of Moshiach, that all these details are not mere stories, but actual halachah [rulings of Torah law]. This is true in all matters in the Rambam's book, even a halachah of but a few words — how much more so when there are two full chapters [devoted to this subject]. From this we learn that there is an obligation to believe and await (not only in general for the coming of Moshiach, but also) all the details enumerated by the Rambam."
The Rebbe continues:
"There are some details which the Rambam writes about that cannot be known how they will be until they occur.' But regarding all the other details, the Rambam clearly writes as a ruling of Torah law, that 'a King will arise from the House of David, who is learned in Torah and occupied in commandments like David his father ... the faith that we must have in these words must have the same strength and assurance as our faith in the Ten Commandments'." Moreover, the Rebbe says:
"Behold, surely King Moshiach already exists in the world... (and) his existence is established as a giant — a king from the House of David..."
The following is the Rambam's description of the Jewish leader who qualifies to be the righteous King Moshiach:
Rambam: Laws of Kings, Chapter 11:4: "If a King will arise from the House of David who is learned in Torah and occupied in the observance of commandments as prescribed by the written and oral law as David his ancestor, and he will compel all of Israel to walk in the way of the Torah and reinforce the breaches in its observance and he will fight the wars of G-d, we may then presume him to be the Moshiach. If he does this and is successful and is victorious over the nations around him, and builds the Temple in his place and gathers the dispersed, then he is definitely Moshiach. And he will perfect the world to serve G-d with one purpose."
The Rebbes of Chabad trace their lineage to the House of King David of the tribe of Yehudah. The Rebbe is accepted as a king by tens of thousands of Jews throughout the entire world. They accept his instructions as the word of royalty. The Rebbe's publications from Shabbos Parshas Shemos, 5751 have been distributed under the name, "The Word of Royalty," with the Rebbe's approval.
The Rebbe's knowledge of the Torah is limitless, constantly revealing new teachings and explanations of concepts in all areas of Torah. His expertise on the entire Torah is accepted by the greatest scholars throughout the Jewish world. The Rebbe talks about seemingly mundane matters and connects them to the Torah, showing how everything in this world is G-dly.
The Rebbe occupies himself in the commandments of the Torah. He sends out emissaries all over the world whose main mission is to introduce Jewish people to the Torah and its commandments.
Moshiach accepts upon himself the goal and mission to compel the Jewish nation to return to the way of Torah and to serve G-d. His entire existence is dedicated towards this goal, and he is continuously working to accomplish this.
There is no other Jewish leader throughout the generations who has affected the Jewish people and reached so many people as the Rebbe. His emissaries carry out his instructions to expose millions of Jews to the Torah and bring them closer to serving G-d. By using the latest technology in the service of G-d, the Rebbe shows that everything in the world has a divine purpose. This can be seen on Chanukah, the Festival of Lights. The Rebbe, presided over a worldwide video satellite transmission joining the five continents of the world with stations in New York, Paris, Moscow, Hong Kong, Sydney, Johannesburg, and Jerusalem — each country simultaneously participating in the commandment of lighting the menorah, uniting Jews all over the world.
This refers to physical and spiritual wars. An example of this is the Rebbe's effect on Russia. During the darkest moments of Communist rule the Rebbe sent emissaries to Russia, perpetuating an underground operation dedicated to the survival and strengthening of Judaism.' When Jews in Russia were forbidden to keep the Torah freely and were persecuted for doing so, the Rebbe said in 5727 (1966) that "Moshiach fights the wars of G-d. This includes eradicating the evil rulership from the land." He further said that "the victory of the war will be when tens and hundreds of thousands of Jews will leave Russia. And all this is through the Moshiach of the generation who fights the wars of G-d." The Rebbe concluded by saying that "when this will be fulfilled, they will know that he who fights against them and accomplishes this is Moshiach."
In the chapter of Laws of Kings in which the criteria for Moshiach are outlined, the Rambam continues, "...if he does this [fulfills criteria for the presumed Moshiach] and is successful, and is victorious over the nations around him and he builds the Temple in his place and he gathers the dispersed then he is definitely Moshiach..."'
The Rebbe mentions that the fall of communism without any bloodshed was miraculous, as it is not the way a revolution usually takes place, yet the whole world took it for granted. The Rebbe refers to this bloodless revolution as one of Moshiach's mounting victories over the nations around him. To quote the Rebbe: "We actually see how it is being fulfilled, 'And he will fight the wars of G-d and will be victorious', and specifically through a war of peace."
On this statement, the Rebbe asks a question: "Why does it not say that he builds the Temple in Jerusalem? Why does it say, 'He builds the Temple in his place?' The Rebbe answers that Moshiach builds the Temple in his place where he lives at the time of exile (before the stage of 'this is definitely Moshiach'). This Temple, the Rebbe says, is the building at 770 Eastern Parkway, the synagogue from which the Rebbe teaches Torah, and from where the "light bursts forth to the rest of the world." The Rebbe explains that the future Temple will be revealed first in the place where Moshiach builds his Temple in exile, and from there it will be moved to Jerusalem. "A11 Jews refer to the house of our Rebbe by its address, number 770." This is the numerical equivalent of the word 'Paratzta' [you shall spread out]. This number '770' is also the numerical value of the words 'Beis Moshiach' [the House of Moshiach]. Every Hebrew letter has a corresponding number. This style of letter calculations is known as gematria. It is one of the methods that the Rabbis of the Talmud (oral law) used to show the inner connection between words with the same numerical value.
In 5727 (1967), the Rebbe prophesied that tens of thousands of Jews would leave Russia and that it would be through the efforts of the Moshiach of the generation who fights the wars of G-d.
When this prophecy materialized, hundreds of thousands of Jews left Russia and most of them went to Israel. In 5752 (1992), on Shabbos Parshas VaYakhel the Rebbe said that what we are witnessing is the ingathering of the exiles — the return of Jews from all over the world to the land of Israel in unprecedented numbers.