Dwayne McDuffie, a highly respected comic book and animation writer who was a co-founder of Milestone Media, a landmark company that created a multicultural comics line that introduced black superheroes such as Hardware and Static, has died. He was 49.

McDuffie died Monday, a day after his birthday, of complications after undergoing emergency heart surgery at Providence St. Joseph Medical Center in Burbank, said Gary Miereanu, a publicist for Warner Home Video.

As a comic book writer, McDuffie had stints working on DC's "Batman: Legends of the Dark Knight" and "Justice League of America," and for Marvel's "Fantastic Four."

As a television writer, story editor and producer for animated series, he had credits on "What's New, Scooby-Doo?," "Teen Titans," "Static Shock," "Justice League," "Ben 10: Alien Force" and "Ben 10: Ultimate Alien."

He also wrote the screenplay for "All-Star Superman," an animated film released Tuesday by Warner Home Video, and the second of three he wrote for the series, "DC Universe Animated Original Movies."

"Dwayne McDuffie left a lasting legacy on the world of comics that many writers can only aspire to," Dan DiDio, co-publisher of DC Entertainment, said in a statement.

"He will not only be remembered as the extremely gifted writer whose scripts have been realized as comic books, in television shows and on the silver screen, but as the creator or co-creator of so many of the much-loved Milestone characters including Static Shock.

"The industry has lost a true talent."

McDuffie launched his career in 1987 as a special comics editor for Marvel Comics.

At Marvel, he wrote for Spider-Man and other major characters and co-created the limited series Damage Control, about a firm that repairs the property damage caused by battles between superheroes and super-villains.

In 1992, two years after leaving Marvel to freelance full time as a comic book writer, McDuffie co-founded Milestone Media, whose comic books were distributed by DC Comics.

When he was a child in Detroit, McDuffie recalled in a 1996 interview with the Detroit Free Press, "there were only two comic strips that had black leading characters. When we got together to form our company, there were still only two — 20 years later. We felt there should be more diversity."

In addition to celebrating diversity, the Free Press reported that McDuffie also wanted to subtly teach important lessons and values, as well as having his characters confront the kind of problems faced by his readers.

"I try to put superheroes in situations where being strong, or being able to fly or fight aren't the answers," McDuffie said. "We've dealt with teen pregnancy, abortion, racism and anti-Semitism. Being able to hit somebody harder doesn't help you deal with that."

McDuffie, however, did not apologize for the violence in his scripts. "If you're talking about the world, you're going to be talking about violence," he said.

Tom Brevoort, Marvel's senior vice president for publishing, told The Times on Wednesday that McDuffie "definitely championed bringing a more multicultural and [inclusive] approach to comics."

Brevoort, who had worked with McDuffie, described him as forthright, direct and honest.

"He put his money where his mouth is, which is to say the things he believed in were reflected in his work and reflected in how he conducted himself," Brevoort said.

Born in Detroit on Feb. 20, 1962, McDuffie attended the Roeper School, a school for gifted children in the Detroit suburb of Bloomfield Hills.

He earned a bachelor's degree at the University of Michigan in 1983 and attended film school at New York University's Tisch School of the Arts.

In 2003, McDuffie shared a Humanitas Prize for "Jimmy," a "Static Shock" script about gun violence in schools.

He is survived by his wife, Charlotte; and his mother, Edna McDuffie-Gardner.

dennis.mclellan@latimes.com