Merlin is the legendary sorcerer of Camelot, England, who also appeared as a character in the Smurfs cartoon show Season 9 episode "The Smurfs Of The Round Table". According to most versions of the legend, he served as advisor and court magician for King Arthur who, because he achieved the seemingly impossible task of pulling the enchanted sword Excalibur out of a stone, was given the right to rule England. Merlin's fame as a sorcerer was well known to Papa Smurf, who idolized him as his hero ever since he was a young Smurfling.
In the episode, Merlin was watching a jousting tournament when his nemesis Morgan le Fey stole Excalibur from King Arthur and used its magic to turn the king and his men to wax (with the exception of Sir Lancelot, who was shrunk to Smurf size, and Merlin, who was turned into a rock). She then cast a spell on the sun to make it burn hotter so that King Arthur and all of Camelot would melt into nothingness, leaving her to rule over England.
The Smurfs who appeared in Camelot when this happened dug up Merlin's rock form from the ground. Although trapped in his rock form, Merlin offered his assistance to help them restore Camelot. They split up into two groups, with one group staying behind to keep King Arthur and his men from completely melting, while the other group led by Papa Smurf went with Sir Lancelot and Merlin to confront Morgan le Fey and to retrieve Excalibur from her. Merlin was helpful in getting the Smurfs to Morgan's castle, but during their confrontation with the evil sorceress, Merlin ended up rolling down a hill and fell into a nearby brook, where he would have remained if Papa Smurf had not heard his cry for help after he turned Morgan into a helpless mouse when Excalibur was wrenched from her grasp.
With Papa Smurf's group succeeding in their quest, Merlin was restored to his human form and so used Excalibur to restore King Arthur, his men, and all of Camelot to normal. King Arthur was so grateful for the Smurfs coming to the rescue of the kingdom that he officially dubbed them "the Smurfs of the Round Table" at a banquet held in their honor.
Merlin was also mentioned in the Season 4 episode "Symbols Of Wisdom", as one of Gargamel's idols which he kept a painting of in his home. It was the image of Merlin and the other idols' impressive beards which inspired Gargamel to magically grow his own beard. Notably, the Merlin seen in the painting looks far bulkier and intimidating than the Merlin seen in Season 9.