Trelane was a puckish, childlike alien introduced to several USS Enterprise crewmembers in 2267. That year, the Enterprise was en route to the Beta VI colony to deliver supplies when it encountered a previously unknown planet. This planet, Gothos, was the homeworld (playplace, really) of the powerful alien Trelane.
Trelane first transported Sulu, and then Kirk, from the bridge of the starship to a fortified manor he had constructed on Gothos. The Enterprise assumed orbit of Gothos and sent a landing party of DeSalle, Jaeger, and McCoy into what they expected would be hostile conditions. Instead, they encountered an Earth-like oasis. There, the landing party discovered Trelane's home, and within it, the two missing officers – and Trelane himself.
Trelane, referring to himself as a retired general and being willing to accept the title "Squire", wore a blue tailcoat over a white frilled shirt and green riding pants with black boots. These clothes, along with his foppish mannerisms, were intended to suggest what he believed conditions on Earth to be at the time. In fact, he was viewing an image of Earth approximately four-and-a-half centuries out of date, perhaps a consequence of the fact he was over nine hundred light years away.
First encounter Edit
The officers were found in a paralyzed state, but were quickly freed by Trelane, who did it with simply a wave of his hand. This was the first evidence of his super-humanoid abilities; there would be others. Trelane was initially quite friendly, but made it clear that his were the rules to be followed, and that the landing party would stay until he chose to let them leave. He made several attempts to ingratiate himself with the landing party, but as his customs were centuries out of date, his attempts served only to amuse the Enterprise crew.
Trelane explained himself and his surroundings by stating that he, as well as some others, had perfected a means by which matter could be converted into energy, and back into matter, at will. When Kirk compared this to the transporter, Trelane dismissed that as a crude example of an infinitely more sophisticated process, elaborating by saying that he was able to restructure matter, essentially the way a replicator does, albeit far more rapidly. In addition, he was able to maintain a field around his planet (or at least in the oasis) that blocked scanning and communications, and was able to confer skills onto others – he taught Uhura to play the harpsichord with a wave of his hand.
Unable to obtain a specific lock through Trelane's blocking field, Spock beamed up all lifeforms in a general radius, returning all Enterprise crew to the ship. Trelane did not beam up, suggesting that he was not alive, or at least, not the kind of life the Enterprise's instruments were designed to detect. Kirk returned to the bridge, ordering the ship to depart – only to find that Trelane had likewise boarded the ship. Within a minute, he had returned the entire bridge crew to his drawing room for a meal.
Second encounter Edit
During the meal, McCoy noticed that the food and drink had no flavor, while Jaeger commented that a fire in Trelane's fireplace burned brightly, but emitted no heat. These details, and Trelane's error in time, suggested that he was not infallible and that he knew of the Earth forms but none of the substance. Kirk and Spock further theorized that some external agency was actually responsible for most of his tricks. Upon noticing that Trelane rarely strayed far from a large wall mirror in his house, Kirk formulated a plan. Choosing to play Trelane's "field-of-honor" game, he tricked Trelane into an old-fashioned duel. Instead of shooting Trelane in the duel, Kirk shot the mirror – which exploded spectacularly. Deprived of his support mechanisms, Trelane was unable to prevent the Enterprise crew from departing, but swore they were all dead men, Captain Kirk especially. The ship departed quickly, but Trelane quickly proved to have other mediums of instrumentality at his command – these proved to be powerful enough to move his planet and intercept the Enterprise no matter what course it took to attempt to evade Gothos, convincing Kirk himself to return to Gothos for what might be a final confrontation.
Third encounter Edit
Back on Gothos, Kirk saw that Trelane had altered the setting, so that he was now a judge determined to sentence Kirk for the crimes of treason against a superior authority, conspiracy, and the attempt to foment insurrection. But it was all too easy for him. Kirk seized on this, suggesting that what Trelane needed was a challenge. He talked Trelane into a sword fight. If Kirk won, Trelane would let the ship go; if Kirk lost, he would die.
Trelane hunted Kirk for a time, using his powers to evade Kirk's attacks and finally to trap Kirk in a cage. But even then, Kirk refused to cooperate, seizing Trelane's sword, and broke the weapon over his knee, an act which drove Trelane into a rage. Kirk realized something about Trelane then: that he had a lot to learn about winning and, in fact, as he said to Trelane's face, "a lot to learn about everything, haven't you?" before slapping him twice on his face.
Just then, Trelane's mother and father, who manifested as two glowing indistinct green forms, appeared. Their discussion with Trelane confirmed Kirk's realization – that, for all his power, Trelane was little more than a spoiled child of his species who needed to be punished for effectively bullying lesser races; a reference to him as "a naughty child with a fully-loaded handgun in unsafe conditions" proved to be especially relevant. Trelane's parents took him away, noting that they would not have allowed him to intercept the Enterprise had they realized how vulnerable Humans were, and apologized to Kirk, promising to maintain his life-support conditions until he had returned to his ship. But they would not answer his questions about Trelane, or themselves, beyond apologizing for Trelane's misbehavior and confessing that it had been their fault for having overindulged him. (TOS: "The Squire of Gothos")
Memorable quotes Edit
"General Trelane, retired. At your service, sir."
"Oh, how marvelous! Devastating! Why, this could kill millions!"
"Honor will be served, eh?"
"Oh, such primitive fury! Why, he's the very soul of sublime savagery!"
"Oh, the remarkable treachery of the Human species."
""Und... Offizier Jaeger! Ein Deutsch Soldat, nein? Ein, zwei, drei, vier! Gehen wir mit dem Schießgewehr!" (Translation: "And... Officer Jaeger! A German Soldier, no? One, two, three, four! Let's go on the shotgun!")
- - Trelane to Jaeger, a geophysicist specializing in meteorology, who was underwhelmed
"I'll fix you for that! You cheated! You haven't played the game right, I'll show you!"
"It's my game and my rules! But, if you need to be persuaded..."
"But I don't wanna come in and I won't. I'm a general! And I won't listen to ya!"
Background information Edit
After asking his agent to arrange for him to play a role in Star Trek: The Original Series, William Campbell was offered the part of Trelane during a call with Gene Roddenberry, with whom Campbell was not yet familiar. In retrospect, the actor stated, "When I got the call, he said to me, 'I've got a great part for you. Bill, I know your work,' and I said, 'Well, what is the part?' He said, 'Well, there are a lot of people who don't believe you can do this character.' He said, 'It's a part of a… kind of an English fop.'" 
As it turned out, William Campbell thoroughly appreciated the role of Trelane. "He was a fantastic character," enthused Campbell. "It was very easy for any actor who'd had any training to play the Squire of Gothos. I never stated I was the only one that could do it. I thought of any number of actors that I would emulate [and] that would be in back of my mind that would play these types of characters. The character was so well written and, of course, it was the show. When you're doing something like that, you have to remember that you're wearing the clothes of the period, so you have to have a kind of a… I took a thing once, I remember, at the theater wing, called 'Styles of Acting', where you'd wear these kinds of costumes, and that's when my training came in handy. And it was just a great role. I mean, it was hard to lose on that role! Now, if you were really bad, it could cause you irreparable harm, but it was just a great part. I mean, it was sensational. I'll never forget it." 
William Campbell initially complained about the judge's wig that Trelane was to wear in one particular scene, as it was originally an extremely curly and full French period wig. Campbell not only pointed out that the wig wasn't the right one but also admitted that the choice of wig would affect his performance. Gene Coon agreed that he was right about thinking the wig needed to be the right kind, so it was corrected thereafter. 
John de Lancie has speculated that Trelane may have been the basis for the character of Q. De Lancie pointed out, "The character of Trelane has a lot of characteristics that are very much like Q." 
Trelane makes an appearance in the CD-ROM game Star Trek: Judgment Rites, having pushed his interest forward to the time of World War I and calling himself the "Baron of Gothos". While the Enterprise is in search of several missing starships, he attacks in a Fokker DR1 triplane fighter, and when defeated, sends Kirk, Spock, and McCoy to a replica of a World War I-era German town named "Gothos". Kirk and his party must move through the artificial town, populated by brainwashed crewmen from captured Federation vessels, in search of the "power objects" that give Trelane his abilities, including a soldier's locket, a clock in a small shop, a school chalkboard, and the triplane fighter. When they were destroyed, Kirk and his party faced Trelane himself. Trelane is revealed to have collected the starships and mounted them in bottles above a fireplace. Depending on the course of action the player takes, either Kirk convinces Trelane that war is nothing that should be emulated romantically, or Trelane's babysitter will arrive and spirit him away.
In the Peter David novel Q-Squared, Trelane is revealed to be a member of the Q Continuum, with Q being assigned as his mentor. In the book, Trelane is able to tap into "The Heart of The Storm", the theoretical and literal center of the universe, where chaos exists; doing so gives Trelane more power than the entire Continuum, allowing him to close it off and play with the universe as he pleases. Trelane then manipulates three different tracks of the USS Enterprise-D timeline – including the canon timeline, a variation of the war timeline depicted in TNG: "Yesterday's Enterprise", and a timeline where Jack Crusher is alive and captain of the Enterprise, among other differences – with the ultimate goal of the experiment being the merging of all parallel timelines and the destruction of the multiverse order. Captain Picard, with the help of Q – implied in the text to be Trelane's father, although Picard respects Q's desire not to discuss the matter in depth – manages to stop Trelane by engaging him in a duel with a sword imbued with Q's essence, Trelane's lack of practical sword-fighting experience allowing Picard to stab Trelane so that Q can penetrate his defenses and disrupt his powers, though the experience reduces Trelane to a speck of his former existence.
Trelane also appears in the 1993 DC comic book "A Little Man-to-Man Talk", and the Marvel Comics Star Trek Unlimited 1998 issue, "An Infinite Jest", in which he and Q play a game with the two main Enterprise crews.