From the Super Mario Wiki
Ads keep the MarioWiki independent and free :)
In The Super Mario Bros. Super Show! live-action segment "The Mario Monster Mash", Dr. Frankenstein, under the alias "Dr. Frank N. Stein", had moved from Transylvania to Brooklyn, New York; coincidentally, in an apartment near Mario and Luigi's own home. Arriving at Mario Brothers Plumbing, Dr. Frankenstein requested Mario and Luigi help him unpack his possessions and also help him in an experiment of his.
It was only when Mario and Luigi were unpacking Dr. Frankenstein's possessions that they realized that Dr. Frank N. Stein was, in actuality, Dr. Frankenstein, the mad scientist who had created a big, ugly, scary monster; when Mario and Luigi made this discovery, Dr. Frankenstein himself appeared before them and told them that they shouldn't talk about his monster in that manner. Asking why, Mario and Luigi are horrified when the monster bursts out of one of Dr. Frankenstein's nearby packing crates.
Later, Dr. Frankenstein, having apparently convinced Mario and Luigi in helping him in his experiment, has the two tie-down his monster while he concocts a serum. Dr. Frankenstein eventually reveals that he had promised the monster a new brain and that Mario's brain would be perfect for the monster; Dr. Frankenstein is convinced by Mario not to use his brain though, leaving Dr. Frankenstein and a hesitant Luigi to go out and search New York City for another brain for the monster.
After a fruitless search for a brain, Dr. Frankenstein, with Luigi, who had picked-up some groceries during the search, return to Mario Brothers Plumbing, only to see that, through an accident, Mario and the Monster had switched brains. Convinced by Luigi to switch Mario and the monster's brains back, Dr. Frankenstein sees that his brain-switching machine is low on power and decides to use an alternative method to switch the brains back; taking a frying pan, Dr. Frankenstein smashes Mario and the monster and their heads, somehow returning the two to normal.
In the end, Dr, Frankenstein leaves Mario and Luigi's apartment, comforting his monster by telling him that he was sorry the monster had such a horrible brain in his head and that its a good thing he got his old one back.