The Justice League of America has asked for assistance of Mystery, Inc. to solve a mystery. The Hall of Justice is being haunted by mysterious robed figures, dubbed “the Rainbow Ghosts” by the League since there are seven of them, one for each color of the rainbow.
Fred Jones asks why the Leaguers would need his help since they’re the world’s greatest heroes. He even has a complete trading card set showing all of his friends and foes… Then he notices Superman isn’t around. Batman shows video footage of the last night. A green ghost attacked Superman. The Man of Steel was blasted by a weird beam and disappeared. No one has seen him since.
The League needs Mystery, Inc. to investigate Superman’s disappearance quietly so no one knows Superman is gone as they look after crime and natural disasters as usual. So nobody suspects when they see Mystery, Inc. poking around, the young detectives are given costumes of several former Leaguers. Meanwhile, Supergirl will cover up for Superman’s absence.
Their planning is interrupted by the Troubalert’s abrupt beeping. Suddenly, two ghosts appear. Supergirl takes the kids to safety while Wonder Woman, Batman and Aquaman confront the purple-robed ghost. Diana’s Lasso of Truth passes right through it. Aquaman fetches a hose but the water stream also passes through the robed figure. Nonetheless, the ghost flickers out of sight when soaked. Batman finds a holographic projector -fried by Aquaman’s actions- attached to the wall and deduces it created that “ghost”. Unexpectedly, they’re attacked by a green-robed ghost which blasts Wonder Woman, Aquaman, Batman and Robin out of sight in quick succession.
Somewhere else, Supergirl has taken Mystery, Inc. to a corridor where she thinks they’ll be safe, and she is about to head back to the monitor room when the group is attacked by a violet ghost. Supergirl confronts him, but the robed figure grabs her neck and lifts her, exhibiting incredible strength. Fred, Daphne and Vilma want to help her out at the same time Shaggy and Scooby suggest to stay out of her way. Still, a yellow ghost appears and traps Supergirl in a glowing, golden force field.
The Rainbow Ghosts appear and surround Mystery, Inc. In the beginning they mistake them for junior Leaguers due to their disguises, but the orange ghost recognizes and unmasks “those meddling kids”. Fred takes advantage of his close position to unmask him—it’s Scarecrow. The Rainbow Ghosts are the Legion of Doom.
Velma is frightened as well as puzzled. Why would the Legion of Doom disguise themselves as ghosts? Lex Luthor explains the Leaguers already know their tricks. The ghosts disguises ensured the League didn’t know who was attacking or how to fight them.
Shaggy suggests his friends to go ahead with Plan B… “B” standing for “Beat it”. Plan B is unanimously approved and carried out. The Legion chases after them. Gorilla Grodd attempts to mind-control Shaggy and Scooby-Doo into stopping, but he fails. Unfortunately, Shaggy and Scooby’s escape is blocked by Bizarro.
Meanwhile, Fred, Daphne and Vilma think have lost their chasers. Fred reflects and recalls what he learnt from his trading cards: Brainiac is an alien who uses his shrinking ray to steal cities and trap them in bottles. He might have done the same thing to the Leaguers. If so, it’s a matter of finding the bottle and freeing them. Daphne and Fred go to search the kitchen as Vilma goes back to look for Shaggy and Scooby.
She finds her friends cornered by Bizarro. Aware of Bizarro’s backward thinking she tricks him into attacking the Legion. As the villains fight, Vilma leads Shaggy and Scooby back to the kitchen. Unfortunately the Legion catches up with the kids as they are still looking for the bottle.
However the shrunken Leaguers are seeing the scene from their bottle on a cabinet and realize they need to get out of there. Superman’s strength wasn’t enough to shatter Brainiac’s manufactured glass, but now he isn’t alone. The five heroes combine their strength to rock the bottle back and forth until it falls off and shatters.
The five diminutive heroes attack the Legion. Superman and Wonder Woman knock Solomon Grundy down, Batman and Robin trip Scarecrow, and Aquaman leads Grodd into a swimming pool where he is seized by Topo, Aquaman pet giant octopus.
Sinestro is about to blast Mystery, Inc. into pieces when his Yellow Power Ring starts to malfunction before leaving his finger and flying to Shaggy and Scooby. Sinestro can’t believe it and wonders whom they could scare. Shaggy replies Scooby and himself scare themselves the whole time. Fred suggests him to use the fear-powered power ring to bring the Leaguers back to their normal size.
The Leaguers make short work of the Legion. Still free and angrier than usual, Luthor whips out a laser gun, determined to blast them all down, but his weapons is ripped from him hand and crushed to pieces by Supergirl. Sinestro’s trap was powered by willpower, so she broke out when Sinestro’s concentration faltered. Upon seeing Shaggy and Scooby wearing Yellow Lantern uniforms, she just knows what distracted him.
Mystery, Inc. considers their case is closed. But before Shaggy hands over the Yellow Ring to the Leaguers for safekeeping, he creates a new trading card for Fred showing the newest Leaguers.