Merlin was believed to be a seer or prophet by some, enchanted with magical powers or just a wise man by others. His legend probably originated in the 500's and was embellished through time.
Merlin made his first appearance in literature in the early 12th Century in Prophecies of Merlin by Geoffrey of Monmouth. Monmouth based his Merlin on a legend who was called Myrddin. Merlin is credited with helping to establish the famous Round Table where all of King Arthur's knights sat, and played a major role in the mysteries of the Holy Grail. Merlin also received credit for being responsible for the moving of Stonehenge (also called The Giants Ring) from Mount Killaraus in Ireland to its current place in Salisbury Plain. Merlin supposedly moved Stonehenge for two reasons. One was for the stones to be a monument to those that had died in battle with the Saxons. The second reason was because the stones possessed great powers of healing. Sir Thomas Malory in "Le Morte d'Arthur" represents Merlin as being an advisor to King Arthur. Alfred, Lord Tennyson in his "Idylls of the King :Merlin and Vivien" portrays Merlin as the architect of Camelot.
Merlin's mother's name was Aldan, and his father was supposedly a devil. Merlin during his lifetime turned his back on evil and dark forces to turn to the power of light and goodness. When Merlin was young, Vortigen, the King of Britain wanted to build a tower near Mount Snowdonia in Wales. The tower kept collapsing without apparent reason every night. It was determined that a fatherless child needed to be sacrificed to remedy this problem. Merlin Emrys was brought forward. The youth told the king's advisors that the reason for the tower collapsing was due to the existence of a pool beneath the foundation. Digging proved this to be true, and two dragons (one white and one red) emerged. The two dragons supposedly symbolized the constant fighting between the Saxons and the Britons. The two dragons began to combat. The white dragon killed the red dragon, and hence Merlin prophesied Vortigen's death by Aurelius and the future of the land. Hence, Merlin became an important figure in the reign of three later kings (Aurelius, Uther, and Arthur).
When Uther became king, Merlin arranged for him to seduce Igraine by making Uther magically take on the appearance of her husband, Gorlois. A child, Arthur, was born of this union and Merlin took the child away. He educated Arthur and kept him safe. When Uther was near death, Merlin arranged for the Sword-in-the-Stone contest so that Arthur could withdraw the sword from the stone and be recognized as the next king. When Arthur became King, Merlin helped him acquire the infamous Round Table and helped Arthur set up his knightly order.
Nimue (also known as Vivien, Eviene, Viviane, Nineve, Nina, Viviene and Niniane) was thought to be a "Lady of the Lake". There seems to be more than one "Lady of the Lake", but in Malory's Morte d'Arthur, Nimue is responsible for Merlin's downfall. Nimue's father was Diones, a vavasor (a landholder, but less than a baron). She met Merlin when she was 16 years of age. Merlin fell in love with Nimue. He was so in love with her that he was constantly at her side. Nimue accompanied Merlin on a journey so that she might learn his magic. Knowing that Merlin could take her unwillingly, she made him swear that he would use no magic to make her lay with him. As they traveled, Nimue became more and more afraid of Merlin's advances. In some versions of the legend, Nimue traded her love for lessons in sorcery. Merlin foresaw his own death, but was so smitten with Nimue that he was helpless to avert his own tragic end. There are different versions of his death. One version has Nimue tiring of him and turning one of his own spells against him and seals him in a cave forever. Other versions have her trapping him in a bush or Hawthorne tree where his voice is sometimes heard. Some tales have him living forever in his confinement and others tell of his death or his descension into madness.
After Merlin's imprisonment, Nimue took on the aspect of being King Arthur's counselor and advisor. She became the lover of Sir Pelleas, whom she married.