Harcourt Fenton "Harry" Mudd was an antagonist from multiple episodes of Star Trek: The Original Series, as well as both Star Trek: The Animated Series and Star Trek: Discovery. He was a con artist who was more of a lovable rogue than an outright villain.
Before his first encounter with the USS Enterprise, Mudd had abandoned his nagging wife and was roaming throughout the galaxy as a grifter and con man.
In 2256 he was captured by the Klingons and imprisoned on board a prison vessel. During his time in Klingon captivity he met Starfleet officers Ash Tyler and Gabriel Lorca. Making a deal with the Klingons, he spied on his fellow prisoners. Learning that Mudd was a spy, Lorca and Tyler left him behind when they escaped from Klingon custody.
After his escape, Mudd's exploits led him to be convicted of smuggling, transporting stolen goods, and purchasing a space vessel using counterfeit currency. He received psychiatric treatment for the last two crimes, though the effectiveness of the treatment was disputed.
Encounters with the USS Enterprise
Mudd's first appearance on the show was in the Original Series episode "Mudd's Women". In this episode, Mudd, after impersonating a deceased man named Leo Walsh, attempted to sell three women to miners on Rigel XII as wives. The women were going along with his plan willingly, but they were taking an illegal drug that caused whoever took it to appear more attractive and alluring, albeit temporarily. Mudd spent some time in jail for his minor crimes, such as piloting an unregistered cargo vessel.
Mudd reappeared in the episode "I, Mudd". Having escaped from Deneb V, a planet where he was given the death penalty for committing fraud against it's inhabitants, Mudd ended up on an uncharted planet populated entirely by androids who became interested in him as a specimen of humanity and treated him like a sort of king. However, he was not allowed to escape, and so attempted to broker a deal with the androids- he'd have his freedom in exchange for other human subjects. He had the Enterprise brought to the planet for this purpose, but the crew managed to escape by confusing the androids with illogical behavior, and left Mudd on the planet with multiple android replicas of his shrill wife for company.
Mudd appeared yet again in the Animated Series episode "Mudd's Passion" on the mining planet Motherlode, where he was found by Kirk and Spock, attempting to sell a love potion drug to miners there. The drug in question caused feelings of love, followed by hatred after a certain amount of time. He was taken prisoner on the Enterprise, but convinced Nurse Chapel to use the drug on Spock, who she was romantically interested in. This led to the drug taking a hold on many of the Enterprise crew. After yet another escape, Harry Mudd was again captured and sentenced to an indefinite period of rehabilitation therapy, without guarantee that it would be effective.
Mudd was originally played by veteran character actor Roger C. Carmel, who among other roles, once played Colonel Gumm on the 1960's Batman series, wherein he faced down (unsuccessfully) Batman, Robin, The Green Hornet and Kato in one of television's most memorable crossovers. Rainn Wilson was later cast to play Mudd in the 2017 series Star Trek: Discovery.