(Fortune Magazine) -- Spider-Man, as any comic book fan knows, isn't the most powerful superhero. He can't push planets around like DC Comics' Superman (owned by Time Warner (Charts, Fortune 500), parent of Fortune and CNNMoney.com). He's just an insecure teenager who, after his encounter with a radioactive spider, can climb walls and swing around on a web. But Marvel's wisecracking web-slinger is Hollywood's most bankable superhero. Sony's "Spider-Man" and "Spider-Man 2" have made $3 billion from ticket sales, DVDs, and TV revenue globally. And "Spider-Man 3" had a record $151.1 million U.S. opening weekend.

You'd think David Maisel, recently named chairman of Marvel Studios, the publisher's Hollywood division, would be eager to talk about Spider-Man's success, but he's not. Why? Marvel (Charts) won't disclose its profits from the first two Spider-Man films, but according to a Lehman Brothers analysis, Marvel's combined take was only $62 million.

Spider-Man isn't the only Marvel star to make lots of money for somebody else. Fox's "Fantastic Four," released in 2005, has grossed $624 million. Marvel only made $13 million. (A sequel, "Rise of the Silver Surfer," opens on June 15.) The three X-Men movies, also produced by News Corp.'s (Charts, Fortune 500) Fox, grossed a combined $2 billion. But Marvel's total share was $26 million.

Since launching its characters in the early 1960s, Marvel has been through lots of corporate ups and downs, including bankruptcy in 1996. Different owners and executives made a series of ill-timed or just plain bad deals to bring the company's A-list superheroes to the screen. Now it's up to Maisel, 44, a Harvard MBA who started his career at Boston Consulting Group, to make Marvel's second string as lucrative for his company as the first team has been for Sony (Charts) and Fox.

To do that Marvel has begun making its own movies. Merrill Lynch put together a group of banks and hedge funds willing to provide the company with a $525 million revolving credit facility. Marvel plans ten films, starting with "Iron Man," now in production and starring Robert Downey Jr. as Tony Stark, the millionaire industrialist turned armored superhero, and Gwyneth Paltrow as his secretary Virginia "Pepper" Potts. A follow-up to Universal's ill-fated "Hulk," starring Edward Norton and Liv Tyler, is also planned for next year.

Marvel, which expects to spend between $100 million and $165 million each to produce the films, is taking a big gamble here. In fact, it is betting its characters. It has a deal with insurer Ambac (Charts) to cover the interest payments to its senior creditors should the movies bomb. If they do, Ambac gets the movie rights to Iron Man and his mighty brethren.

Can Marvel prevail with a slate of characters - Thor, the recently deceased (but sure to be resurrected) Captain America, Ant-Man - that, beloved as they are to longtime comics fans, are mostly unknown to today's kids? And can a comic book publisher and licenser turn itself into a profitable Hollywood studio? Wall Street thinks yes. As of early May, Marvel's shares were trading at $29, up from $20 a year earlier. That's partially because of the new strategy but also because Spider-Man's third screen appearance should enable Marvel to move plenty of Spidey merchandise.

The story of Marvel's misadventures in Hollywood - and its hopes to finally get it right - is a tale of three executives. The first two are practically superheroes themselves in the eyes of Marvel fans: Stan Lee, 84, the company's legendary former editor-in-chief, and Avi Arad, 59, former chairman and CEO of Marvel Studios, who used his passion for superheroes and his gifts as a salesman to stir up enthusiasm for the X-Men and the Fantastic Four in Hollywood and on Wall Street.

Then there's Maisel, who joined the company in 2004 and recently elbowed Arad aside - much as Arad did Lee more than a decade ago. He may seem a pretty pale character compared with his predecessors. But his bosses - and investors - hope he will turn out to be an archetypal Marvel figure, not unlike Spider-Man: the dweeb who develops awesome abilities and then beats all the odds to do good. Or in Maisel's case, make a lot of money.

Creating a Hollywood franchise

It's hard to talk about Thor with a straight face. Introduced in 1962, he is a buff, golden-locked incarnation of the Norse thunder god. He wields an enchanted hammer and talks in a Shakespeare-meets-the-Marx-Brothers dialect: "Let foes beware!! We strike for Earth - and the realm eternal!"

The challenge for Marvel Studios is to take what Stan Lee and the brilliant artist Jack Kirby were able to make work in comic books 45 years ago and turn it into a 21st-century Hollywood franchise. That's what screenwriter Mark Protosevich, whose credits include "The Cell" and "I Am Legend," is struggling with. On a February morning he's on speakerphone in Marvel's Hollywood office giving several executives an update. "We're not talking about a New Agey interpretation of gods here," he says. "We are talking about vengeful gods, interfering gods." In walks Maisel, carrying a replica of Thor's hammer. "Just to inspire you guys," he says. He looks happy to put it down. The thing is surprisingly heavy, but what would you expect? In the comic, no one but Thor can lift the magic mallet.

The new studio head doesn't come off like the kind of guy who would know this. Maisel - whose resume also includes stints at Walt Disney Co. and the Endeavor Talent Agency - has none of the playfulness you'd expect from someone whose job is to make movies about guys in tights. Instead he talks endlessly about Marvel's business plans. Think of him as Captain Finance.

He says the Merrill Lynch (Charts, Fortune 500) deal, which he negotiated, will enable the company to do three things. First, Marvel will be able to keep all the profits from its superhero movies. Second, Marvel will be able to determine their release dates, which will make it easier to sell action figures and other merchandise. Finally, Marvel can use the buzz generated by the pending movies to do more licensing deals.

"All those various things wouldn't have been possible if we couldn't tell people, Yes, we're making films and we control our destiny," Maisel says. "It's not like we have to wait for somebody down the street to green-light something." Maisel shrugs off talk that Marvel is relying too heavily on secondary characters. He says audiences will turn out for Iron Man et al., because Marvel is a powerful brand like Disney or Pixar - a brand, he adds, with a universe of more than 5,000 of its own characters to draw on.

The man who brought the most important of them to life, Stan Lee, holds the title of chairman emeritus. He has little to do with Marvel's movies these days. "I'm not really consulted," he says. "I'm usually called when they have a cameo they want me to do, but that's about it." His relationship with the company is complicated. In 2002 he sued Marvel for millions in back royalty payments and later settled for an undisclosed amount.

The Marvel story really began in 1961 when Lee and Kirby conjured up the Fantastic Four, a team with personalities and problems to go with their powers. It was such a hit that Lee tried similar things with Spider-Man, whom he co-created with artist Steve Ditko in 1962. Spider-Man was even more of a phenomenon.

But while Lee, a gifted promoter - and self-promoter - reinvented the superhero genre, he wasn't much of a businessman and never had much luck getting his neurotic heroes out to Hollywood where the real money was. In 1968, publisher Martin Goodman (Lee's uncle) sold the company to Perfect Film & Chemical Corp., which changed its name to Cadence Industries. In the late '70s, Cadence sent Lee to Los Angeles. The major studios weren't interested in costumed heroes who weren't Superman. This was also long before computer graphics lowered the cost of making a Spider-Man movie with special effects that weren't laughable.

In the end, Cadence practically gave away the film rights to many of its characters to second-tier studios like Cannon Films, whose low-budget movies "The Punisher" (1989) and "Captain America" (1990) were commercial failures. There was little improvement when financier Ronald Perelman took control of Marvel in 1989, planning to use it as the cornerstone of his own media empire. Comic quality plummeted, fans rebelled, and Marvel filed for Chapter 11 in 1996.