The magic flute is a powerful instrument used by The Pied Koopa in The Super Mario Bros. Super Show! episode "The Pied Koopa". The Pied Koopa first uses the magic flute to lure the Mushroom kids of Pastaland to his castle. He then uses the kidnapped children as blackmail to exchange them for the citizens' spaghetti.
After Mario and Luigi rescue the children, The Pied Koopa attempts to rush near and play the magic flute again only for Mouser to drop him into the castle moat, not wanting to look after the children again. The Pied Koopa then loses the magic flute in the moat, where it is never seen again.
Mario and Luigi are also able to use instruments to lure the Mushroom kids. Despite this the instruments they use are improvised pipes from The Pied Koopa's castle basement, implying that the real magic was from the song that they played.