Harry Mudd

Harcourt Fenton "Harry" Mudd was an antagonist from multiple episodes of Star Trek: The Original Series, as well as an episode of Star Trek: The Animated Series. He was a con artist who was more of a lovable rogue than an outright villain.

History
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. During this time, his 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.