The first real use of Marvel Zombies was more of a prank than anything else. Mark Millar and Greg Land were doing Ultimate Fantastic Four and all signs pointed to the idea that they were setting up a crossover. Not just any crossover, but THE crossover. Marvel had been adamant about the Ultimate Universe being separated from main continuity, but solicitations and covers made it seem like the two Reed Richards counterparts were going to meet up. Much of Ultimate Fantastic Four #21 played into this with Ultimate Reed conversing with an alternate universe Reed who very much resembled the mainstream one. Ultimate Reed created a portal to go visit him.
What he found was zombie incarnations of the Fantastic Four with Reed asking, “Ever had the feeling you’ve been had?”
The rest of the arc was about Ultimate Reed trying to survive and escape that world with the help of that world’s Magneto. This set the stage for the first Marvel Zombies miniseries, written by The Walking Dead’s Robert Kirkman with art by Sean Phillips (Arthur Suydam did zombie parody covers of classic Marvel art, which would continue for several more miniseries). Initially, Kirkman wanted to do a story about Luke Cage being the last hero alive, playing up his unbreakable skin as a deterrent, but since the Ultimate Fantastic Four arc already depicted Zombie Luke Cage, that was off the table.
Instead, his story involved two main arcs. One was the survival of Black Panther, who – much like the animated What If…? episode – was kept alive, albeit with his limbs being gradually removed for the sake of being zombie food without infecting the body. While the cartoon had Scott Lang’s disembodied head, the comic had a decapitated Zombie Wasp as Panther’s ally. She was never cured of the disease, but she did stop being hungry after a while and came to her senses.
The other story was about Earth’s zombified heroes dealing with the coming of the Silver Surfer and Galactus. A handful of them went on to devour the invaders and absorb their cosmic powers, along with their cosmic hunger. Hank Pym, Iron Man, Luke Cage, Wolverine, Spider-Man, and the Hulk went on to wipe out nearly all life in the universe as the Zombie Galacti. The follow-up was the basis for Marvel Zombies 2.
As for what caused the zombie outbreak in the beginning, that’s where things get a little hairy. The Ultimate Fantastic Four story revealed that a Zombie Superman (recolored to be the Sentry so as not to piss off DC) got so hungry that he punched reality until breaking into an alternate universe and infecting its heroes.