Introduced in Superman #30 (September 1944) as "Mr. Mxyztplk", he was an imp from the fifth dimension. Not being bound by our physical laws, he could do things that seemed to be magical. In this first appearance, Mxyztplk wreaked havoc across Metropolis by using his powers to pull all manner of pranks. He soon told Superman that he was a jester in his home dimension, explaining why he used his powers to play practical jokes. Superman soon discovered he was able to send Mxy back to the fifth dimension by making him say his name backwards.
Originally, Mxy had designs on conquering the planet for himself, but soon settled for tormenting Superman whenever he got the opportunity. His only weaknesses were that he could not stand being ridiculed and if he said or spelled his name backwards, Kltpzyxm, he was involuntarily sent back to his home dimension for a minimum of 90 days. Mxy would often look for ways to counter the latter weakness, but he always proved gullible enough for Superman to trick him time and time again.
Mxy appeared originally as a small bald man in a purple suit, green bow tie and purple derby hat. This was changed to a futuristic looking orange outfit with purple trim in the mid-1950s, although the hat remained. At around this time the spelling of Mxy's name changed (by mistake) to "Mxyzptlk".
After the establishment of DC Comics' multiverse in the 1960s, it was later explained that the purple-suited Mxyztplk lived in the fifth dimension connected to Earth-Two and the orange-costumed Mxyzptlk in the fifth dimension connected to Earth-One. The Earth-One version was also retconned into Superboy stories as "Master Mxyzptlk".
Mr. Mxyzptlk continued to be a thorn in Superman's side for many years. Despite Alan Moore offering a radically different interpretation of the character in Whatever Happened to the Man of Tomorrow?, he made it through the Crisis on Infinite Earths relatively unchanged, although the unpleasant nature of his pranks and the psychological effects they had on others was played up more, at least initially. In early post-Crisis stories the "condition" that would send him back to the fifth dimension was anything he wanted it to be but, since Lex Luthor taught him how to lie, making this meaningless, the stories have reverted to Mxyzptlk saying his name backwards. Many of Mxy's later stories have a post-modern feel to them, similar to Ambush Bug, as he comments on editorial decisions, cliches of the genre, etc. This was most obvi