As you might've already guessed, National Comics, the company that would later become DC, was not happy about Captain Marvel outselling Superman. So unhappy, in fact, that they filed a lawsuit against Fawcett that made it to court in 1948, alleging that they'd violated the copyright on Superman by ripping him off wholesale for their own character (via The Irish Times).

Unfortunately for Fawcett, that actually is what happened. In a much later interview, Roscoe Fawcett would recall telling his staff "Give me a Superman," with his only other specification being that his secret identity should be a kid. Even beyond that, the similarities were impossible to ignore. 

Superman didn't have the market cornered on super-strength and invulnerability, but Captain Marvel did spend most of his time battling his arch-nemesis, an evil bald scientist, and the cover to "Whiz" #2 featured him tossing a car, much like Superman on the cover of "Action Comics" #1. In 1954, the courts ruled against Fawcett, and they lost the rights to continue publishing Captain Marvel stories.

The spirit of Shazam did live on, though, in a pretty ironic way. After the suit, Otto Binder would take a job at DC and become one of the primary architects of Superman in the Silver Age. Not only did he bring the same kind of stories to Superman that he'd been doing for Captain Marvel, he wound up introducing some of the most famous pieces of the Superman mythos, including the Bottle City of Kandor, and a very Mary Marvel-esque character you might've heard of called Supergirl.