Mary Marvel's origin is given to us in Captain Marvel Adventures #18 (published November 13, 1942). Within the pages of this comic we not only have her origin, but we also learn that she's Billy Batson's twin sister!
The story begins with station WHIZ hosting the The Mental Marvel Quiz show, with Billy starring as emcee! The contestants are Percy Pill, Mary Bromfield, and Freddy Freeman. Billy starts with the quiz questions, and each contestant proves they are up to the mental challenge. While an announcer takes over with some commercial announcements, Billy is handed a strange hand-written message that says, "Dear Billy Batson, I am dying. Please come and see me. This is most urgent." The letter is signed by Sarah Primm of 14 Elm Street. Billy has only 5 minutes before The Mental Marvel Quiz begins again, so he transforms to Captain Marvel and within seconds arrives at Sarah Primm's house. Captain Marvel transforms back into Billy before entering the house.
Inside, Billy meets Sarah Primm who is on her deathbed. She tells Billy that her hour has come and she must tell Billy about...his twin sister! Sarah reveals that she was nurse for both Billy and his sister Mary when their parents died. She took the babies into her own home before taking them to an orphanage. However, Sarah was also the nurse of a rich family who had also just had a baby girl that had suddenly died. Sarah came up with a scheme - she switched Billy's sister with the dead baby girl of the rich family. Billy's sister would be raised by the wealthy family and Billy was taken to an orphanage. Billy asks, "Who raised my twin sister? Where is she now? How will I know her?" Sarah tells him, "You'll know her by this broken locket. She wears the other half. (Sarah gives the locket to Billy) She was raised by a wealthy lady named...." But death strikes before Sarah Primm can reveal the name of the family that raised Billy's sister. Billy's 5 minutes are almost up, so he transforms back into Captain Marvel and returns to The Mental Marvel Quiz.
The Mental Marvel Quiz comes to an end and Billy escorts Mary Bromfield to her car and after she leaves he realizes she was wearing a locket just like the one Sarah Primm gave him. Billy and Freddy Freeman say their magic words and transform into Captain Marvel and Captain Marvel Junior and take off after Mary. The two heroes arrive just in time to see Mary being kidnapped! In short order the ruffians are dispatched and Captain Marvel asks Mary about the locket she's wearing. Cap gives Mary the locket Billy was given by Sarah Primm, Mary puts the lockets together - a perfect fit!
"What does it mean?" Mary asks, and Cap proclaims, "It means you are Mary Batson -- the twin sister of Billy Batson!" Mary asks where Billy is and why didn't he come, and then before her eyes Captain Marvel transforms back into Billy Batson! Billy lets her in on the 'family secret' and then Captain Marvel Junior also transforms back to Freddy Freeman - now Mary knows the secret of both Captains.
While Billy, Mary and Freddy are rejoicing, the ruffians have recovered and capture the two boys and put handkerchiefs over their mouths. Unable to say their magic words, Billy and Freddy are at the mercy of the hoodlums. Mary shouts, "Billy! Freddy! Speak your magic words!...Oh, they can't they're gagged...Billy can't say Shazam!..." The comic narrator tells us, "Mary Batson said the word 'Shazam' for the first time...and instantly there is an answering roll of thunder...a blinding flash of lightning...and a new figure appears in the place of Mary Batson!" Yes, Mary Batson has just transformed into Mary Marvel!!
Shazam meets them and Billy introduces Mary to him. Shazam assures them all is well, he knew all along about Billy and Mary, but he allowed things to unfold naturally. Shazam also explains that Mary doesn't derive her powers from the same heroes Billy does, but instead, hers are sourced from a different set of Shazam's heroes. He explains who gives Mary her powers:
- Selena - grace
- Hippolyta - strength
- Ariadne - skill
- Zephyrus - fleetness
- Aurora - beauty
- Minerva - wisdom
Shazam then tells Mary, "Go now, my child! Fight evil and wrong in the world as your brother and Freddy do. My spirit is always with you!" The three kids exit the subway and transform into the mighty Marvels. Freddy departs - telling them he needs to get back to his own adventures. Cap tells Mary to stay with him for a while and then they'll fix her up with her own spot in Wow Comics!