The segment, which aired on Wednesday, featured Levi giving the late-night host access to the same way he receives his powers in Shazam!
"Say my name and my power will flow through you," Levi says to Corden while holding a magical staff. Corden, after uttering "Shazam," then suddenly receives the same red and yellow costume Levi dons in the DC Comics epic.
Corden, after a series of tests that ends with him falsely believing he has super speed, discovers that he has the power to continually grow a goatee after saying "Shazam."
The seemingly useless technique comes in handy when the comedian stops a purse snatcher from escaping by distracting him with the superpower.
"I got instant goatee and super speed. That's what my superhero name will be, Speed Goat," Corden says.
Levi then pays the mugger and thanks him for helping Corden feel better about his power.Shazam!, which also stars Jack Dylan Grazer, Mark Strong and Djimon Hounsou, arrives in theaters on Friday.
Read More'Shazam!': Zachary Levi puts his powers to the test in new trailer Zachary Levi is a laid back hero in first 'Shazam!' poster Ben Platt, James Corden team up to cover Adele, Beatles
Zachary Levi, Adam Brody attend 'Shazam!' premiere