Merlyn is a fictional character in the Marvel Comics universe. He claims to be the Merlin of British Legends (see Identity) and has served for many years as the Omniversal Guardian, a function his daughter Roma took from him. Though the Merlin character first appeared in earlier comics, Merlyn first appeared in Captain Britain #1 (1976).
The profile at the end of the Die by the Sword trade gives his first appearance as Young Allies Comics #11 (1944), explicitly linking the modern version with the earlier, legendary, version. However, that Merlin appears to be only one aspect of Merlyn, as the profile states "Evidence suggests Merlyn and his daughter Roma are physical amalgamations of all their interdimensional counterparts, presumably with access to the combined knowledge and skills of the entire gestalt." Other characters have also passed themselves off as Merlyn as "His legendary reputation has led others, Merlin Demonspawn, Space Phantoms, stage magician Joe Cooke and the time traveling Doctor, to impersonate him, further confusing matters.
This page only deals with the confirmed actions of Merlyn.
Merlyn travelled to Otherworld and established himself as Omniversal Guardian, safeguarding the total of all universes in existence. With the powers of the Matrix, Merlyn dedicated himself to protecting the universe and finding Necrom. Necrom hid and planned for the next few centuries, changing the part of the Phoenix Force that he had stolen into the Anti-Phoenix. Merlyn founded the Captain Britain Corps, a group of matrix-powered superheroes based on each Earth in the omniverse. Merlyn sent his best agent, Sir James Braddock, to Earth 616 to father a hero. James' first son, Jamie Braddock, was unsuitable for Merlyn's purposes, but the twins Elisabeth and Brian both were. Merlyn chose Brian to become Earth 616's Captain Britain and he would be pivotal to Merlyn's plans.
Over the years, Merlyn manipulated Brian to become a stronger and wiser hero. He partnered Brian with the Black Knight, another of Merlyn's champions, to teach him more about magic. Merlyn used Brian to stop Mad Jim Jaspers, a reality warper who threatened the fabric of the multiverse itself. Merlyn seemingly died in the battle between Jaspers and the Fury. Merlyn was buried and Roma took over as Omniversal Guardian.
Merlyn faked his death though and hid, even from his daughter. In secret he manipulated his daughter and Captain Britain to form Excalibur, a team of superheroes, who would become his weapon against Necrom. Excalibur would take the tower that was part of the Matrix as their base, not knowing the true meaning of this building. Necrom resurfaced and fought Excalibur. In the battle, Rachel Summers killed Necrom and Merlyn appeared to congratulate Excalibur. Excalibur was furious at Merlyn for manipulating them and endangering them all. Roma, also disappointed in her father's callous behavior, assisted Excalibur in destroying their tower and by extension the Matrix. Merlyn left in rage at losing his source of power.
Merlyn and Roma both met occasionally on Otherworld, but Merlyn didn't retake his position as Omniversal Guardian, trusting his daughter to protect the Omniverse. He was nowhere to be seen when Mastermind took over Otherworld or during the House of M. He has recently reappeared in X-Men: Die by the Sword where he attempted to get revenge by sending agents to attack Captain Britain and teaming up with the revived Jim Jaspers. During this fight Merlyn attacked and killed Roma but was eventually defeated along with all his forces by a combined Excalibur and Exiles and then disappears. However, before making his escape the last remaining shard of the Fury entered Merlyn's body without him knowing.
Merlyn being the physical amalgamations of all his interdimensional counterparts allowed Merlin to remove the shard of Fury while taking his other counterparts madness out with it, this allowed Merlin to take control away from Merlyn.