Three years ago, Nic Pizzolatto was an assistant professor of literature at DePauw University in Indiana, a job he "fell into" rather than loved, and one he was desperate to escape. Television seemed like an impossible dream. "The idea was ludicrous," he says. "I grew up in a working-class Catholic family in south Louisiana. I went to a state university. I taught literature, wrote a novel that was the novel I wanted to write and got a couple of good reviews but no real traction. I had no idea how to get a job in TV."

What he did have, however, was desperation. When his 2010 novel Galveston, about a smalltime criminal on the run from New Orleans, attracted attention from agents interested in optioning it, the conversations soon turned towards TV and adaptations. "They asked if I'd written any screenplays. I hadn't. I think they thought I was wasting their time. But I knew this was my one chance. I went away and wrote."

That sentence doesn't quite do justice to what Pizzolatto did next – which was quit DePauw, move his young family to Los Angeles, and start churning out scripts like a man possessed. He wrote for 48-hour stretches, crashing out only to dream about his characters. "I wrote about everything I could think of – and one of those scripts was True Detective."

That script hit the bullseye. It is now a new HBO drama starring Matthew McConaughey and Woody Harrelson. A thriller unlike any other, True Detective is melancholic, dense with symbolism, and features astonishing performances from its leading duo, who play a pair of detectives searching for a possible serial killer. The show feels less like a standard TV procedural, and more like a crime novel come to vivid life. Pizzolatto switches the action between 1995, when his two detectives (blustery family man Harrelson, obsessive loner McConaughey) are investigating the ritualistic murder of a young runaway, and 2012, when those same detectives, now long since out of the force, are being interviewed in connection with a new death. The big question is: why have their lives fallen apart so dramatically? "I wanted to look at the relationship between these men and how it changed," says Pizzolatto. "I wasn't interested in doing what everyone else was doing. The point wasn't to write another serial-killer show."

The result is already being talked about in the same hushed tones normally reserved for the likes of Breaking Bad and The Wire, no small achievement for a 38-year-old former academic with next to no TV experience. In the month since True Detective premiered in America, Pizzolatto has been compared to the three Davids (Simon, Milch and Chase – the men behind The Wire, Deadwood and The Sopranos) and has just signed a two-year deal with HBO that will allow him to develop a second series, while working on additional projects. He is now being hailed as the hottest thing in Hollywood by everyone from the LA Times to the Daily Beast, with Galveston set to become a film, too.

It's a meteoric rise by any standards – and it doesn't stop there. "I knew True Detective wasn't something I could allow anyone else to develop," he says. "But by the time HBO expressed an interest, I still had no real experience." Despite this, Pizzolatto held his nerve and demanded complete creative control. Incredibly, he got it: he is True Detective's sole writer, executive producer and showrunner, an almost unheard-of deal in America, where writing teams and copious notes from producers and studio execs are the norm. "I'm still a little amazed they agreed," he says. "At that point, I'd only written two episodes and had a rough outline of where the show would go. HBO could have easily sidelined me. I was a complete unknown."

It helped that the newly in-demand McConaughey saw a copy of the script and lobbied to play the enigmatic Rust Cohle, a man plagued by hallucinations and his own pessimistic vision of an unjust world. "That was another way I got lucky," says Pizzolatto. "When Matthew expressed an interest, it was right before his renaissance. I'd seen Killer Joe and knew he was one of the few actors who could say Rust's dialogue and make you believe it. With a lesser actor, the part would have had to be drastically rewritten."

If True Detective were just another murder mystery, then Pizzolatto wouldn't be nearly as feted. But this eight-episode drama set in the rural badlands of Louisiana("I wanted to write something set in the sort of places people don't set TV series") is a crazed dream of a show, stuffed full of philosophy and despair, languid yet driven by a furious energy. It certainly feels as if it was written at speed by a man desperate to seize his moment.

"When I was writing I had to keep pushing into my own personal vision," says Pizzolatto, "and not worry about how a studio would see the show. Otherwise, you're just doing what everyone else is doing. I think the strangeness was what drew both HBO and the actors. I knew this was my one shot."

• True Detective starts on Sky Atlantic at 9pm on Saturday.