From the Super Mario Wiki
“Without me pot of gold coins, I'm a jinx!”
In The Super Mario Bros. Super Show! episode "Mighty McMario and the Pot of Gold", Murphy's gold coins had been stolen by King O'Koopa, and without his gold coins, the leprechaun became a jinx, bringing bad luck instead of good.
Murphy meant well, as he treated Mario, Luigi, Toad and Princess Toadstool to lunch at the Shamrock Inn. However, his bad luck caused Mario to lose his lunch. On top of that, when King O'Koopa ordered his Koopa Troopas to raid the inn, Murphy's bad luck caused Mario's group to get hurt.
After escaping from the Koopas, Murphy's bad luck eventually triggered a rain storm, which slowly started to flood the Shamrock Kingdom. Mario and his friends tried to get the Pot of Gold Coins back from King O'Koopa without Murphy's help, but when they took too long, Murphy went after them, and his bad luck caused all of them to get caught.
Although Mario managed to find a way out of the dungeon, he told Murphy to keep safe while he rescued Princess Toadstool. Unfortunately, King O'Koopa caught him, along with everyone else. King O'Koopa was proud of his accomplishments in the Shamrock Kingdom, and was ready to leave the place as it began to start flooding.
When Murphy pointed out that his bad luck had ruined everything, Mario realized that they had to use the bad luck to their advantage; namely, have Murphy act as King O'Koopa's best friend. When Murphy's bad luck rubbed off on King O'Koopa, a series of mishaps caused him to blow up his own castle. Now afraid of what the leprechaun's bad luck could do to him, King O'Koopa surrendered, and fell into the moat.
Murphy then got his coins back, and the curse was immediately broken. The rain storm stopped, and a rainbow appeared in the sky. Murphy gave Mario a hug, and he was relieved when nothing bad happened. Mario then fell through the floor, but realized that it was good luck this time, for he landed at a table where a meal was waiting for him.