HE’S lauded as a genius in the American television industry.

During his three decade career, David Milch, the mastermind behind long-running series NYPD Blue and acclaimed western Deadwood, has been credited with changing television and amassed a fortune of more than $100 million.

And now it’s gone.

According to a lawsuit filed by his wife Rita Stern, 70-year-old Milch gambled away $25 million between 2000 and 2011 alone. He’s in debt $17 million, has lost their two mansions and is living on a $40-a-week allowance.

For Milch, his extreme talent has always been matched by extreme demons.

“The first time I shot up, the guy who was my dealer said, ‘Heroin’s gonna give you everything, but you’re gonna have to give everything to heroin,’” he told the New Yorker in 2005.

Milch grew up in Buffalo, New York — the son of a surgeon who also struggled with gambling and later killed himself. From the age of five, Milch would accompany his dad to the races in Saratoga, California every August. At the track, his dad would send him “mixed messages”.

“The first thing he informed me was that he knew that I was a degenerate gambler ... but it would be impossible for me to gamble because you had to be 18 to make a bet,” Milch told NPR’s Fresh Air radio program in 2012. “On the other hand, he had arranged with the waiter, Max, to run my bets for me, and, therefore, I would be able to bet. And with that set of mixed messages, I was off.”

He told The New York Times in 2000 that all of his “happy memories of childhood are associated with the racecourse”. By the age of eight, Milch started hitchhiking across the border to Canada to place bets.

His love affair with racing inspired his short-lived 2011 series Luck, about the world of horse racing and the trainers, jockeys and gamblers inside it.

“Once you enter into that world, your chemistry changes, and your chemistry changes in the same ways it would if you became a drug addict,” he told NPR about gambling.

And Milch knows first hand the similarities between the two addictions.

After graduating from Yale, he briefly had a teaching fellowship at the University of Iowa before he left and enrolled in Yale Law School in 1968 to avoid the draft during the Vietnam War. While there, he made several attempts at writing novels, but became severely frustrated, suffering writers block. He turned to drugs and alcohol.

‘’Heroin saved my life,’’ he said in a New York Times profile. “In the sense that it normalised my existence. Up to that point, as an alcoholic and doing the other stuff, I would have been dead.’’

Expelled for blasting a shotgun at the lights on the roof of a police car, Milch also lost thousands of dollars on bets and spent a brief period in a Mexican prison.

A stint back at Yale as a lecturer in English literature followed before he left in 1982 to write for the TV series Hill Street Blues. It was that same year he married Rita Stern, a documentary filmmaker and painter who was an undergraduate at Yale while he was a teacher.

On their first date, Milch lost all Stern’s money after betting on jai alai (a ball game) matches.

Steven Bochco, who hired Milch on Hill Street Blues and would later co-create NYPD Blue with him, says Milch was a “madman” when he first moved to Los Angeles to work in television.

“He had this little office and he managed to turn it into this place that looked like a bomb had gone off,” he told the New Yorker in 2005. “I went in there one day and the drawer was open and there was a ton of cash inside. I said, ‘How much is that?’ He said, ‘I won some money in Vegas.’ It turns out he was commuting to work from Vegas. He’d catch a 6am flight to Burbank and at the end of the day he’d catch a flight back to Vegas and he’d be up all night gambling.”

When Hill Street Blues ended in 1987, Milch created a few other series before he struck gold with NYPD Blue in 1993. By this stage, the money was rolling in.

A profile in the New Yorker states he earnt $12 million in the final three years of Hill Street Blues, and, at the time of publishing in 2005, he had earnt $60 million from NYPD Blue. More dollars have rolled in since then thanks to lucrative syndication rights.

Soon after NYPD Blue hit the air, heart problems sent Milch back to drugs. Seven years into the show’s incredible 12 year run, Milch exited to deal with his problems.

His approach to work is erratic and odd, with Milch seemingly chasing the same thrill he got from drugs and gambling in the creative process.

On NYPD Blue, it’s said he obsessively oversaw every episode. He’d often write scenes just hours before they were to be shot.

On Deadwood (the acclaimed American western series he created in 2004), last minute scenes became normal. Writing the show, Milch would surround himself with a team of writers in a room and lay on the floor. He’d then spit dialogue off the top of his head and have someone transcribe it.

Despite his weaknesses, it’s only his talent and intelligence that’s spoken about by friends and colleagues.

“Quite honestly I don’t think I understand 50 per cent of the stuff he’s saying. But when he’s done talking, I think, ‘We might win a Nobel prize’,” Timothy Olyphant, who played Seth Bullock in Deadwood said of Milch in behind-the-scenes footage on the show.

While his addiction to various drugs has faded in and out, it’s his romance with gambling that has hung around. He’s owned several race horses over the years and has always been a familiar face at the track.

It's not just gamblers who need support It's not just gamblers who need support. It's those around them. Support, advice and counselling is available for family and friends. Courtesy: ResponsibleGambling

“He was one of the most devoted gamblers,” John Perrotta, an adviser on Luck, told The Hollywood Reporter. “He was very serious about it, and he was a very good handicapper.”

So serious that he’s gambled away his estimated $100 million fortune.

In a lawsuit filed by his wife Rita Stern last year (and recently reported by The Hollywood Reporter), Milch lost $23 million gambling at the Santa Anita racetrack in California between 2000 and 2011. This doesn’t include cash spent gambling elsewhere. He owes $17 million in debts, is on a repayment for back taxes to the IRS and is living on a $40-a-week allowance, according to points in the lawsuit detailed by The Hollywood Reporter.

Stern filed the lawsuit against the couple’s business managers Nigro Karlin Segal Feldstein & Bolno LLP (NKSFB), alleging they did not inform her of her husband’s losses or how dire their financial situation was turning.

At the height of his success, Milch bought two mansions — one in Los Angeles’ elite Brentwood, the other an estate on Martha’s Vineyard — together worth over $13 million.

Since beginning their payment plan with the IRS, they’ve sold their Brentwood home for $4.8 million and put the Martha’s Vineyard estate on the market for $8.95 million. They currently live in a rental property in Santa Monica.

The lawsuit also states Stern has had to sell jewellery, art and hold garage sales in order to raise money.

“Rita makes sure that David is unable to gamble, providing him with only $40 per week in cash,” the lawsuit states.

After Stern found out about their financial situation and debts, the lawsuit states Stern insisted her husband stop gambling and receive treatment.

She’s now seeking $25 million in damages from NKSFB for not revealing the “extreme debt she was in, including unpaid taxes and loans,” the suit says.

An attorney for NKSFB told People magazine she does not “think [the case] has any merits at all factually or legally.” A motion to dismiss on statute of limitations grounds has been filed.

The couple currently live off residuals from Milch’s previous TV shows as well as his current exclusive deal with HBO which THR estimates to be in the “low seven figures”.

After 34 years, they remain married.

“The thing with David is he’s like the girl with the curl: when he’s good, he’s very, very good, and when he’s bad he’s horrid,” Stern said of her husband in a 2005 New Yorker profile. “There’s nobody I’ve ever met as smart and as funny and as generous. He’s just the best.”