Elijah was intended to be the second work of a trilogy of Biblical oratorios. The first, St. Paul, premiered in 1836. In 1837, Mendelssohn conducted a performance of it at the triennial Birmingham Music Festival. That work was so successful than the festival voted to commission a new oratorio from Mendelssohn for 1846.
Mendelssohn came from a Jewish family that converted to Christianity, and from both his Jewish and Christian backgrounds he would have been familiar with the story of Elijah, a prophet who was often at odds with the people of Israel and its King. That conflict is at the heart of the oratorio, and gives it its dramatic power.
The libretto was written in German by Julius Schubring, a German theologian and friend of Mendelssohn's. Mendelssohn set the German text, then had it translated into English by William Bartholomew. As a result, it's probably not surprising there's occasional awkwardness in the way text and music mesh.
Nevertheless, the premiere performance on August 26, 1846, was a huge success. Mendelssohn conducted a 271-voice choir and 125-piece orchestra in the Birmingham Town Hall, and according to the London Times, "Never was there a more complete triumph--never a more thorough and speedy recognition of a great work of art." Mendelssohn himself wrote to his brother, "never before has a piece of mine gone so splendidly at the first performance, and been received so enthusiastically by the musicians and the listeners."
In December, Mendelssohn revised the score, then in April of 1847 he returned to England to conduct six performances in London (where Queen Victoria and Prince Albert attended), Manchester and Birmingham. But the strenuous trip took its toll on Mendelssohn. Just six months later he died at the age of 38, making Elijah his last major work he completed, and leaving us to wonder what he had in mind for Christus, which was to have completed his trio of oratorios.
Within a century, Mendelssohn's star seemed to have dimmed. English musicologist Gerald Abraham wrote in 1938 that Elijah sounded "uncommonly like opera gone wrong." But Abraham and other critics are long-gone, and Mendelssohn's music remains: in England, only The Messiah is more popular.