The prophet Malachi says, "Behold I will send to you Elijah the Prophet before the arrival of the great and awesome day of G‑d."

Elijah will appear in order to herald the coming of Moshiach. Some say he will arrive three days prior to the revelation of Moshiach. Others say that he will arrive before the war of Gog and Magog which will precede the arrival of Moshiach.

Regardless, the fact that Elijah has not yet appeared doesn't preclude Moshiach from coming this very moment. If we are found deserving today, G‑d will not delay the Redemption even one extra moment.

Elijah will also serve several other important functions:

  1. The fact that Elijah has not yet appeared doesn't preclude Moshiach from coming this very momentHe will bring peace to the world.
  2. He will rectify Israel's behavior, causing them to repent and return to G‑d.
  3. He will ordain rabbis; a necessary prerequisite to the reestablishment of the Sanhedrin (Supreme Rabbinic Court). (To be eligible to serve on the Sanhedrin one needed to be ordained by an individual who can trace the chain of his ordination back to Moses—who ordained Joshua and the seventy elders. Through the course of the exile this chain has been broken.)
  4. He will issue decisions regarding unresolved halachic disputes.
  5. He will inform every Jew to which of the twelve tribes he belongs. (His ability to establish the tribal ancestry of every Jew stems from one of his favorite pastimes—attending circumcisions. Who better to recount the lineage of every Jew than someone who was at every Jewish circumcision?)

Why Elijah?

Elijah will herald the future redemption for he personifies the essence of the Messianic Era: the culmination of the refinement and elevation of this physical world which we are accomplishing throughout millennia of exile.

An analysis of Elijah will explain why, of all the prophets and sages, specifically he was chosen to be the bearer of the greatest tidings ever. To better understand Elijah, let us juxtapose him against Moses, our first redeemer.

Moses:

Regarding Moses' birth, the Torah tells us that his mother, Jochebed, "saw him that he was good." Our sages explain that she perceived that with Moses' birth, the entire home was filled with light. On a deeper level, the "home" is a reference to the body, the soul's domicile. For most people, life is a constant struggle between the soul and its spiritual agenda, and the body and its desires and urges. For such people, life's challenge is to work on refining the body, until it is in harmony with the soul.

Elijah's mother's gestation period was a full twelve months!This was not the case with Moses. Moses' soul was so powerful that despite its descent into a body, its holiness was undimmed; his body couldn't conceal its light; it was never a match for the intensity of his soul. Moses bodily needs were somewhat irrelevant; his body was merely the vehicle through which his remarkable soul communicated with this world. This is the inner reason why Jochebed was only pregnant with Moses for six months: his body was never fully developed; only the soul was of prime importance.

Elijah:

Our sages tell us that Elijah's mother's gestation period was a full twelve months! Indeed his body was fully developed – perhaps a tad overdeveloped – and presented a formidable foe for his soul and its holy agenda. Throughout his entire life, Elijah was forced to struggle to achieve a state of spirituality and refinement. His inborn "animalistic" nature is alluded to in his Hebrew name, Eliyahu, which incredibly has the same numerical value as the word behema (animal)!

Yet Elijah wasn't deterred by the magnitude of the challenge. He persisted in his quest for refinement and succeeded in refining himself—to the extent that his body became sufficiently purified and spiritual that it was able to ascend as-is to the spiritual worlds. Even Moses was unable to accomplish this feat, because refinement of the body was never his objective.