Billy Batson is a young orphaned child. He lives in an abandoned building and is terrorized by an older street thug named Lagreen who takes any money Billy gets and beats him if he doesn't cooperate. As Billy sits in his room during a storm, Lagreen barges into his room.
Earlier, Billy was enjoying some hot soup with an older homeless man, Talky. Billy sees a man that looks like his father across the street. Billy follows him into the subway. They get on a red and yellow train with a yellow lightning bolt on the side. The train makes a stop and the mystery man tells Billy to get off.
Inside a big cavern, Billy sees seven statues, Pride, Envy, Greed, Hatred, Selfishness, Laziness, and Injustice along with an old man sitting at the end of the room. Billy assumes he's God but he tells him he's just a wizard. He says his time is short and he needs a replacement.
The wizard chose a magic word for Billy comprised of the name of heroes whose powers he will gain: Solomon, Hercules, Atlas, Zeus, Achilles, and Mercury. Upon saying "Shazam," Billy is transformed into Captain Marvel.
Marvel is told he has a new host. Just then, his time is gone and the wizard is seemingly crushed.
Back in his room, Billy utters the word, "Shazam!" and Lagreen is thrown out of the window.
Later Captain Marvel flies back in time with Billy to the Rock of Eternity. The Rock sits at the moment of the Big Bang. Billy wants to go to the top of the mountain to see what lies before our universe was born. Captain Marvel tells him that it is forbidden. Inside, they talke to the spirit of the wizard. Captain Marvel believes that Billy should be living a better life. The wizard discovers that Billy has a younger sister that he was unaware of.
About to utter the magic word, Billy is stopped. Using magic at the Rock of Eternity would cause a terrible paradox. He is told to wait outside. Just then, the eyes of the seven statues open. This indicates that something big is going down back on Earth.
Going to get Billy to head back, they find he is not outside. His bottom of his shoes can be seen floating above the tip of the mountain. Marvel snatches him down.
Billy awakes back in his room. Thinking it was a dream, he hears the noise of police sirens and helicopters. Out the window he hears a women call for help. Going down, he finds the two preying on the woman are not men, but rather alligators dressed in clothes that can talk. They tell Captain Marvel that their leader, Mr. Mind, will be looking for him.