Actor Zachary Levi was earlier cast as the lead in the film, which follows a boy named Billy Batson who can transform into an adult superhero by uttering the magic word "Shazam!".
The "Annabelle: Creation" star will portray the role of one of the close friends of Batson in the film to be directed by David F Sandberg, reported Variety.
"Shazam!" is an acronym of the ancient world gods and historical figures Solomon, Hercules, Atlas, Zeus, Achilles and Mercury, from which the big Batson derives his heroic attributes when in adult form.