The idea of a messiah figure has long been an element in the genres of science fiction and fantasy. Perhaps the earliest use of a messiah figure in fantasy is the mythical figure of King Arthur.

Warning: Wikipedia contains spoilers.

Table of contents
1 Narnia
2 Dune
3 Babylon 5
4 The Matrix Trilogy
5 Deep Impact
6 Superman

Narnia

C. S. Lewis wrote the fantasy series The Chronicles of Narnia as a parable for the New Testament, to introduce readers to the Christian idea of a messiah; the lion Aslan dies for other people's sins but is reborn, and is part of a trinity.

Dune

The concept of the messiah is central to the Dune series of books by Frank Herbert. The main charater in Dune is Paul Atreides (titled Paul Muad'dib), the messiah of the Fremen people. The series explores the power of the messiah on the individual as well as the idea of destiny as it pertains to the concept of the messiah.

Babylon 5

J. Michael Straczynski had a series of three messiah-figures in his television series Babylon 5; the messiah is referred to as "The One". "The one who was" refers to Captain Jeffrey Sinclair, a man with ties to the Minbari prophet Valen, "The One who is" refers to Captain John Sheridan, who gave his life and came back from the dead at Z'Ha'Dum to save his people, and "The One who will be" refers to the Minbari ambassador Delenn, who will lead her people into the future.

The Matrix Trilogy

The Matrix movie trilogy also features a messianic figure referred to as "The One". "The One" has many prophecies relating to his role in humanity's salvation. In The Matrix, "The One" is described thusly by the character of Morpheus: "When the Matrix was first built, there was a man born inside who had the ability to change whatever he wanted, to remake the Matrix as he saw fit. It was he who freed the first of us, taught us the truth. As long as the Matrix exists the human race will never be free. After he died the Oracle prophesied his return and that his coming would hail the destruction of the Matrix and the war, bring freedom to our people." Thomas A. Anderson, aka Neo, discovers that the world he lives in is merely a computer simulation intended to keep humanity enslaved. Not only does he penetrate this illusion, but he discovers that he has significant abilities to manipulate the simulation himself and joins with other rebellious humans to bring down the entire system. Mr. Anderson doesn't find true confirmation of his role as the One until he is killed in battle, but manages through his own power over the Matrix to somehow bring himself back to life immediately thereafter. Students of Gnosticism will notice many of its themes touched upon. Other themes include the free will vs. fate debate and the nature of reality, perception, enlightenment, and existence. In many ways The Matrix is about a kind of reality enforcement.

The Matrix Reloaded featured a Neo who had many new powers, among them, the power of flight, incredible fighting abilities, and the power to resurrect the dead. The film also changed the role of "The One", revealing that the existence of "The One" was a recurring flaw inherent to the programming of the Matrix, and that his purpose is to return to the machine mainframe to assist in reloading the Matrix program. In addition to doing so, "The One" is meant to choose a number of individuals from the Matrix to repopulate Zion, the last human city, after its destruction. Neo is the sixth One, and the first to refuse to cooperate with the machines in favor of saving his beloved Trinity. In The Matrix Revolutions, Neo visits the machine capital in the real world to negotiate with the machines. Since the Matrix has at this point been taken over by a rogue program, Smith, a former agent and a replicating virus, Neo negotiates an end to the war between humans and machines in return for Neo's help in destroying Smith. Smith ultimately copies himself over Neo, but is destroyed in the process, allowing for the Matrix to be reloaded. Neo thus sacrifices himself to save both humanity (who would have been destroyed by the Matrix system crash and the destruction of Zion) and the machines. In one of the closing scenes, the body of Neo, plugged into the Matrix in the machine city, glows with a bright white crucifix, the symbol of Jesus Christ, the Christian messiah.

Deep Impact

In the movie Deep Impact, the name of the space shuttle that saves Earth from a comet impact was named the Messiah. At the end of the movie the Messiah's crew sacrifice themselves by using the ship as a kamikaze missile to split the comet's nucleus.

Superman

The superhero is often described as a messianic figure. Neo, of the Matrix trilogy, is described as a superhero, and in The Matrix Reloaded, a character even remarks on his flying with the comment, "He's doing his Superman thing."