Mills died Tuesday night in New Orleans, said HBO spokesman Diego Aldana, declining to provide any other information. No cause of death was released and an autopsy is pending.
Mills had been living in New Orleans while co-writing and acting as co-executive producer of the new HBO series "Treme." He wrote two of the upcoming episodes, which are being shot in the city. The drama is set to premiere 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."
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" and "Homicide: Life on the Street," among other shows.
Mills started his television writing career with longtime friend and "Wire" creator David Simon 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."
"Treme" is set in New Orleans after Hurricane Katrina. The series 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.
Copyright (2010) Associated Press. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.