Young runaway orphans Billy Batson and his sister Mary are sent to another foster place, where they make friends with school janitor Dudley H. Freeman and his crutch-bound nephew Freddy. While protecting a kid from bullies, Billy stumbles onto a magical cave where he meets the wizard Shazam who sought him as a new apprentice. He endows Billy with the powers of Greek gods Solomon, Hercules, Atlas, Zeus, Achilles, and Mercury, turning him into a powerful fully grown costumed man dubbed Captain Marvel, who can transform back and forth by speaking the wizard's name. But when the wizard is wounded by a mad scientist and an intelligent caterpillar with means of his power, Billy realizes he needs the help of Mary, Freddy, Dudley, and a talking tiger to combat them, along the way becoming a family.