Gwen figured it out first, of course. She always had been very perceptive. It had only taken a few instances of unexplained victory or loud clanging of armor being dropped quickly right before she walked in the door for her to know something was up. It was confirmed when she saw his eyes flash gold as a branch fell on one of the bandits that was attacking them, and she had a quick cryptic conversation with Gaius before deciding to not mention it and to just help from the outside as much as she could.
Gwaine was next. It took a few trips to the tavern, but he eventually noticed that Merlin, after having a few too many drinks, started talking nonsense and making small objects float around the room. For a while he thought it was just the ale, but then the innkeeper, who hadn’t been drinking, approached him to ask that he tell his friend to be a bit more careful. Everyone liked Merlin, and no one wanted to see his head chopped off. Gwaine stopped taking him to the tavern so often, then, and wouldn’t let him have as much to drink. He figured he would let his friend tell him about the magic when he was ready.
After that was Leon, along with some of the newer knights. Arthur had been knocked out by the attacking evil sorcerer, and was lying prone on the ground too far away for any of his stunned knights, who had been thrown back by the same blast that had disabled their king, to help. Merlin ran out from the trees behind which he had been hiding to stand in front of Arthur. Leon was about to jump up and yell for him to get back when a stream of incomprehensible words flowed from the servant’s mouth and the sorcerer was hurled into a tree, where he fell to the ground and didn’t get up. Merlin glanced over at the knights, seemingly making sure they were unconscious, before kneeling by Arthur’s side to wake him up. Leon quickly stopped his comrades before they could do anything rash, telling them that they could talk later, and stepped up to listen to Merlin’s made-up story about how the sorcerer’s spell had apparently backfired, sending him flying into the tree at the base of which he lay, and how Merlin had been protected by the trees that he hid behind. After they had returned to the castle and thrown the trussed-up and still unconscious sorcerer in the dungeons, Leon had taken the rest of the knights to the armory, where they found Gwaine. They had filled him in on what happened, and he told them he knew already, and Merlin obviously wasn’t hurting anybody and was, in fact, helping them, and they would be fools and he would challenge them all to duels if they turned the servant in. The knights had all agreed, though some had taken a bit of convincing, to keep quiet on the whole matter unless he started using his magic for evil. He would tell them eventually.
The other knights close to Merlin- Percival and Elyan- were filled in by Gwaine and Leon. They took the news rather well, and weren’t that surprised. Percival, in fact, said that Lancelot had hinted that there was something special about Merlin that he knew about, but he wouldn’t tell anyone else, wanting to let his friend keep his secret.
Morgana, surprisingly, was almost the last to find out. They were at war with her- again- and Arthur and Merlin were attacked while walking through the woods by a band of her soldiers. Arthur was quickly knocked out after killing ten or eleven of the enemies, leaving Merlin to face the rest by himself. He was just using his magic to throw them all against trees and rocks when Morgana showed up. She was, obviously, shocked, but she quickly recovered from her surprise to send a ball of fire at Merlin and Arthur. The warlock waved it aside easily and threw a bolt of energy at Morgana. She deflected most of it, but was weakened enough by the small piece that struck her that she knew she wouldn’t be able to defeat Merlin at that time. She vanished in a haze of smoke and started plotting, leaving Merlin free to wake Arthur up a bit and bring him back to their camp. He decided to give it no more thought until he got a chance to talk to Gaius.
Arthur’s discovery of his magic was, of course, the most dramatic. There was a situation with three wyvern, a chimera, and Arthur and Merlin stuck in the middle, and of course Merlin had had to use his magic and Dragonlord powers to kill the chimera and send the wyverns off to who-knows-where. Arthur had, naturally, been pretty upset, until he saw that the chimera had gotten a strike in before being destroyed and Merlin was bleeding heavily from a gash on his chest. Arthur, still rather put-out, dragged his half-conscious friend to Gaius and let the physician treat his ward before pulling him aside to get some information. By the time Merlin woke up he had been filled in on everything magical that had happened in the years since they had met, and had gone off to his chambers to think it over. After a few days, Gwen visited Merlin, saw how distressed he was, and gave Arthur a stern talking to. Two days later, when Merlin was out of bed and had had a long conversation with Arthur, the ban on magic was lifted and the former manservant was made the Court Sorcerer. Geoffrey was told to record all the events of the past several years, and soon all of Camelot knew of the manservant-turned-Court Sorcerer and best friend of the king, and all he had done for them. Some things were kept within the castle, though. The people never had to know about the troll-queen.