Surprisingly, a superhero comic book character was the one who popularized the expression “holy moly!” (initially spelled “holy moley!”).

In the 1940s, Captain Marvel (initially known as Shazam) was the comic book industry’s biggest hit. Billy Batson, boy reporter for WHIZ Radio, became the superheroic Captain Marvel once he uttered the magic word “Shazam,” the name of the wizard who granted him his powers. The child alter-identity of the DC Comics superhero, often blurted out the phrase “Holy Moly!” when he was startled, fascinated, panicked, or frustrated.

The expression dates back to 1892, however no one is quite sure of the exact origin of the phrase. Etymologists theorize it was initially coined as a substitute for the phrase, "Holy Moses", which, at the time, would have been considered blasphemous.

As it turned out, Captain Marvel was hardly alone in his use of what's referred to as a “minced” or “split” oath. In those days, it was common practice for religious or upstanding citizens to adopt a wide variety of semi-religious (but generally harmless) expressions in lieu of sacrilegious swear words.

Captain Marvel's exclamation of surprise was very similar to the “Holy cats!” and “Holy mackerel!” that society uttered at the time. It is likely that kids often heard similar expressions at home; therefore parents would have had no valid reason to criticize either their kids, or the comics.

More Info: whatculture.com