Mills died Tuesday night in New Orleans, said HBO spokesman Diego Aldana. Doctors at Tulane Medical Center said he suffered a brain aneurism, according to a statement Wednesday from Mills' latest production, "Treme."
Mills was on the set of the new HBO series as it filmed a scene at Cafe du Monde in the French Quarter when he was stricken and rushed to the hospital, where he died without regaining consciousness, the statement said.
"He was an enormous talent," said David Simon, a co-executive producer with Mills who first met the award-winning writer in the newsroom of their college newspaper. "He loved words and he loved an argument but not in any angry or mean-spirited way. He loved to argue ideas. He delighted in it, and he was confident that something smarter and deeper always came from a good argument."
Mills was living in New Orleans while working as a writer and executive producer of the drama set in the post-Katrina city and slated to premiere on April 11.
Wendell Pierce, who played Detective William "Bunk" Moreland on "The Wire," and plays a musician in "Treme," said Mills collapsed on the set Tuesday.
"He was carrying on a conversation and just fell over," Pierce said. "They called the medics, but there was nothing to be done."
"Treme" is named after the Creole neighborhood known for its rich musical history.
"I'm so sorry he won't be able to see the launch of the show he cared so much about," Pierce said.
HBO said in a statement that the network is "deeply saddened by the sudden loss of our dear friend and colleague."
"He was a gracious and humble man, and will be sorely missed by those who knew and loved him, as well as those who were aware of his immense talent. David has left us too soon but his brilliant work will live on."
"Treme" cast and crew members held a memorial for Mills on the set Wednesday morning, Pierce said.
"He was very quiet and introverted, but spoke volumes when he wrote," Pierce said of Mills. "He challenged us as actors and he challenged Americans when it came to matters of race. He was one of the more talented people working in TV. He made it much more than just empty entertainment."
Mills began his career as a reporter for The Washington Post, before turning to screenwriting. Besides "ER" and "The Wire," he worked on the HBO drama "The Corner," ''Homicide: Life on the Street," ''NYPD Blue" and was executive producer and writer of the short-lived NBC miniseries "Kingpin," about a Mexican drug cartel.
Mills started his television writing career with Simon, a longtime friend and "Wire" creator, in 1994. The pair wrote an episode of "Homicide" that year, for which they won a Writers Guild of America award. Mills won Emmys for co-writing and executive producing the miniseries "The Corner" and an Edgar in 2007 for "The Wire."