William Campbell's first wig was a French hairpiece. He demanded that an English barrister's wig be found to fit his character. William Shatner complained that precious production time is going to be wasted for something he found to be a minor and unimportant detail. Director Don McDougall didn't want a conflict with the series star, so he called producer Gene L. Coon to the set to arbitrate the matter. Coon decided in favor of Campbell, and filming was halted until the English wig was found.
When William Campbell went for his audition, he had just read one paragraph, when the producer broke it up, saying "Go straight to wardrobe. He's perfect for the part."
The voices of Trelane's parents were provided by Barbara Babcock, who played several other guest characters in TOS, and Bart La Rue who, in real life was one of James Doohan's (Scotty) best friends, and the best man at Doohan's 1974 wedding to Wende Doohan. (It is sometimes incorrectly reported that Doohan himself provided the father voice.)
In an interview on the Star Trek: The Next Generation (1987) Season 7 DVD, John de Lancie said he believed that Gene Roddenberry, whether consciously or subconsciously, was channeling Trelane when he created Q.
Trelane says to Kirk, of Uhura: "Ah, a Nubian prize. Taken on one of your raids of conquest, no doubt." During filming, William Campbell blew the line with a supposedly embarrassing blooper, "Ah, a Nubian slave!" According to Campbell, Nichelle Nichols, an activist of African-American Civil Rights Movement, responded, "I'll kick you in the ankle!" However, 'Nubian' is largely an ancient Greek and Roman usage, so a captured Nubian would probably be retained or sold as a slave.