Between 1994 and 2003 Dennis Lehane wrote a novel a year and it gave him, he says, a "super-thick" skin. He is in any case built for rebuttal: stocky, forward-leaning, with a little shoulder pivot when he walks and a get-out-of-jail-free grin. For the last five years he has worked on a single book, The Given Day, an historical epic of 700 pages and of a scale of risk that has quite unmanned him. "I feel like if this bombs, God: it's going to be my Heaven's Gate, my Waterworld." He cringes. His heart, he says, is finally "exposed".

Lehane is from inner-city Boston and his accent comes out when he's drunk, angry or doing impressions of his younger self, most arrestingly during the interview in a scene from his school days, in which he repels the advances of a Jesuit priest. The power of his books is place. The 43-year-old's Boston is a city at war with itself: in Mystic River, his most successful novel, an old working-class neighbourhood churns beneath gentrification. In the Kenzie and Gennaro series, like all good detective fiction, the city is as sharp and unpredictable as the villains themselves. The Given Day is set during the run-up to the 1919 Boston police strike, at the height of the Bolshevik movement in the US. Under cover of a roaring good tale it's a brilliant exposition of urban poverty and how violence flashes down from mass movements to the family around the dinner table.

We are in St Petersburg, Florida, where Lehane lives when he's not in Boston. His wife is an ophthalmologist here, and he teaches creative writing at Eckerd College. He rents an office in a part of town where the rent is cheap and the views overlook a noir-ish vista of derelict lots and blowsy palms, all the way down to the ocean.

Officially, Lehane's books are noir, although their success has blurred the boundaries, and with The Given Day he has moved into what he would caustically refer to as literary fiction. He has written three episodes of the TV series The Wire (in seasons three, four and five), and is currently developing a TV show about Boston in the 1970s. On the wall of his office is a photo of him talking earnestly to Leonardo DiCaprio on the set of the latest film adaptation of one of his novels, Shutter Island. For nine years, Lehane built up a fan base in modest increments. Now he can barely write a shopping list without Hollywood optioning it.

Having been poor for a long time, when the money started rolling in he explicitly warned himself: "You could become a real dick." The greatest thing about having money, he says, is the removal of the worry about not having it. "And that's huge. As anyone who's ever stared at the ringing phone thinking that's a debt collector or had that horror of thinking will my lights go on, will know. All of which I've been through. Suddenly that was gone."

He wrote his first novel in three weeks while he was a student and slung it in a drawer. It was a crime novel, and he knew that if he published it he risked being hemmed in as a "genre" writer. But literary fiction at the time seemed desperately boring, full of "middle-class, well-appointed couples suffering from malaise". He says: "Don't get me wrong, I love literary fiction. It's faux literary fiction I can't stand."

He had learned a certain stubborn self-belief at writing school. Lehane himself went to Eckerd, attracted after his freezing Boston childhood by the Florida sun and the fact that Raymond Carver went there. He had already dropped out of two other degree courses and finally stopped pretending he wanted to be anything else; he had been writing short stories since he was eight. The brutal workshop rite of students critiquing each others' work toughened him up and also, he says, gave him perspective. "It's good not only to realise that you can't please all of the people all of the time, but that you don't want to. There's a certain type of reader that you don't ever want to write for. And that really helps. I impressed a moron, why should I care? Or I pissed off a moron, why should it bother me?"

After he graduated he took the novel out and rewrote it a score of times. A Drink Before the War was the first of the series featuring detectives Patrick Kenzie and Angela Gennaro, the fourth of which, Gone Baby Gone, was filmed by Ben Affleck in 2007.

The next four novels came out one a year with methodical discipline. Lehane had the advantage of a thoroughly developed dramatic milieu at his disposal, from his upbringing in Boston, which in the 1970s was a city on the brink of civil war. The youngest of five children, he was the son of a union man, a foreman at Sears, Roebuck, and a homemaker, both first-generation Irish immigrants. His neighbourhood was at the junction of two warring factions. "Directly to our north was South Boston, which was 100% white back then, very poor, very angry, very racist. Then to our east was Roxbury, which was primarily black. Then there was us. When those two went to war, guess who was Poland? We kept getting overrun."

His was the last generation to grow up on the streets, dispelled from the house until supper, without it counting as neglect. They set up hockey nets in the road, removing them when a car drove past, and waited for the day when the council re-tarred the roads to scratch a baseball diamond into it. At the end of the day his mother would call him through the streets, with the other boys' mothers, and the names would ring through the alleys from building to building.

Apart from a set of encyclopedias there were no books in the house. But when the nuns told his mother her youngest son was a reader she took him to the library. His father liked only non-fiction. He couldn't even stand feature films. "He took me to see Star Wars when I was a kid and he fell asleep during the invasion of the ship. At the beginning. He just went out." Lehane blinks in fresh amazement.

The race wars in Boston gave him an early sense of how to sketch dramatic incident. "If you ever see violence in my books, it has that coming-out-of-the-corner-of-your-eye kind of feeling. And then all of a sudden it's in front of you. You'd be walking down the subway platform and you'd see a sudden movement and then you'd turn and they'd be people beating the shit out of each other. And then you're stuck in it." Lehane was witness to all this without actually being caught up in it. "It's that speech from The Third Man about Switzerland producing the cuckoo clock. I was blessed to grow up in really interesting times and to go back to a home where I was very safe."

It also gave him an understanding of his country's delusions about class and race. He says: "I believed from a very young age that all race warfare is essentially class warfare, and that it's in the better interests of the haves to have the have-nots fighting among themselves. And I believe that to this day. It's probably the strongest socialist tenet that I have." The only time Lehane saw his father lose his temper with his mother was when she crossed a picket line, to buy food in a supermarket. "And he said, well, how are those guys going to get food if you cross the picket line?"

He adds: "Not to say unions aren't corrupt; God, they fucked the school systems in the US. But the most corrupt union in the world is better than the best corporation."

Class has always been subtly present in his books and is brought to the fore in The Given Day through its partial setting in the labour movement at a critical time in US history. The growing strength of the unions led to their being demonised by the right as a Trojan horse for the Bolsheviks and "anarchists". Lehane doesn't have to work too hard to make contemporary parallels. In a line Dick Cheney would be proud of, Eddie the bent copper explains to his colleague, Danny Coughlin, "we're hunting radicals. We're protecting and serving this great land."

"By compiling lists?" says Coughlin incredulously, and complains that the "anarchists" his colleague sees everywhere are "plumbers unions, carpenters, every toothless socialist knitting group you can find. For what?"

The conflict is still depressingly relevant. Lehane is amazed by how many "otherwise mature" Americans ask him why unions are necessary. He replies: "You might want to thank them for the weekend, the eight-hour day and the fact that your 12-year-old doesn't work in a sweat mill."

Which is not to say that he isn't a "deeply committed" capitalist. But there is a difference, he says, between capitalism and consumerism. "If you want to find out everything that is wrong not only with American but with capitalist culture, it's all in that security guard who got killed on Black Friday" - the man who was trampled to death during the first day of sales at a Long Island branch of Wal-Mart. "Everything is there. Everything that is wrong in our culture, right there. Do people understand that a life was lost so that, what, they could get a cheaper piece-of-shit DVD? That they didn't fuckin' need? It's disgusting. This wasn't Stalingrad 1943; they weren't running for food. They were running for some piece-of-shit MP3 rip-off, flat-screen TV." Lehane's Boston accent is quite strong at this point.

In Mystic River, a small boy is kidnapped by paedophiles and returned to his parents days later; the novel unravels in the wake of the fall-out. In Gone Baby Gone a gang of child-killers terrorises a neighbourhood. Lehane isn't too keen on examining his obsessions, lest they evaporate under scrutiny. "But I'll always be fascinated with loss of innocence or corruption of the soul at a young age."

In the last five years some of the priests who taught him at Jesuit school have been busted as paedophiles. Now and then another will surface in the newspapers and he'll call his old school friends to say "Hell, it's about time."

"We knew who they were. We'd make jokes about them: yeah, Father, I won't take a hug this morning, no thank you! What's really terrifying about it - repulsive - is that they don't prey on guys like us. We could joke. It's the kids who couldn't joke about it, or who came from shattered homes or who needed affection. Those are the guys who were vulnerable. I still remember this one priest, he came up to me one day as I was walking across campus and he put his hand on my shoulder and said, 'What's the matter son, why the long face?' And I said [he grins, cheekily] 'I don't know father! I was born with it!' And I just walked away. And then I went straight to my friends and joked about it."

For a while after college he was a counsellor working with traumatised children, but had to give it up; it was so depressing it stopped him from writing. It did however inform his politics and later, his fiction. It is, he says, his one reactionary streak. "I'm so far to the right on this issue, I'm Pat Buchanan. I think sexual predators should have a mandatory 'one mistake and you're out' law."

There are elements of his Catholic upbringing that Lehane is grateful for. His first big sales spike came when his novel Prayers for Rain was photographed in Bill Clinton's hand ("another thing to be thankful to him for") as he exited Air Force One in 1999. Then Clint Eastwood bought the film rights to Mystic River. Two years after finishing the book, it was on-screen, and in 2004 Sean Penn and Tim Robbins won Oscars for their performances in it. It was nominated for best picture. In terms of his becoming a dick, this, says Lehane, was the danger point.

"My first marriage blew up right around then. And it gave me a great perspective on what was going on. I remember a friend saying, aren't you having the time of your life? I said, I just lost my house and I just lost my wife; what's there to be fuckin' happy about? I'm having a steak with Clint Eastwood? I mean, not that it's not nice. I loved everybody I worked with on Mystic River. Clint Eastwood is the classiest human being in Hollywood. But it was like, I just want my life back. Right at that moment, when I could've turned into an asshole, perspective was slammed down my throat. With the best Irish Catholic guilt, I think it was suffering meant to give experience. It was the balance."

When he was invited to contribute to The Wire, a daunting task mid-way through the revered TV series, he says he was "ignorant" enough not to feel intimidated. He knew he'd be coming right after an episode by Richard Price. "So I'd be in a really good shape in the lead up." Still, he had to have several goes at it. "They had to take me to school on my first script, there's no question. I didn't know what I was doing." It was over-written. "You write it like a novel. It should be spare. And it was wonderful to learn how to do that."

David Simon, the show's creator, says: "For anyone used to the solitary art of prose writing, such a process might feel awkward, and maybe Dennis felt a bit at sea on finding himself doing something so strangely communal. But in my mind, his contributions were there from the first: it may have felt to him as if he was feeling his way, but from our point of view, he never seemed anything other than assured."

Lehane drives me to a shopping mall near the airport and tells me a story that could come from one of his novels. He was living in Boston and the apartment building he was in was replacing its fire alarms. For a short time there was no alarm coverage. That night a propane tank on the roof blew up. The roof was completely devastated, but none of the residents woke up. Some homeless men asleep under a bridge across the street saw the fire and rang doorbells, banged dustbin lids and rang 911 until everyone was out safely, which is why, says Lehane, when someone on the street asks him for a dollar, he says: "Hell, have 20."

The thing that shook him about it was something the fireman said. He explained that the homeless men were woken every morning at 5.30am by the sun striking them under the bridge. The fire had started at 5.20am. "An hour earlier and they wouldn't have been awake. That gave me chills for the rest of my life." It also reinforced his moral outlook; the generosity that infuses his work. "It's true," he says, of the men who saved him, and it stands just as well for his characters. "There is nothing better than the least of us."

On Lehane

Ever since his first novel, A Drink Before the War, introduced the duo of blue-collar Boston detectives Patrick Kenzie and Angela Gennaro, Dennis Lehane's gritty psychothrillers have carved a distinctive patch on the map of contemporary crime writing. Their fifth case, Prayers For Rain, brings the now romantically separated protagonists together in a case involving corruption, the secrets of a wealthy family, twisted kidnappers, a brutal mafioso and a frightening sociopath adept at playing sinister cat-and-mouse games with his intended victims. The apparent suicide of a pretty socialite sets the ball rolling, and all too soon it becomes intensely personal for Patrick and Angie. With Michael Connelly, Lehane has become one of the most electrifying thriller writers of the century's final decade, a dark and hypnotic modern successor to Raymond Chandler.Maxim Jakubowski, the Guardian, 1999

After five impressive novels dissecting the fraught relationship between a couple of private eyes, Dennis Lehane establishes himself as one of the greats of crime writing with Mystic River. Spanning 25 years in the lives of three friends growing up in the working-class neighbourhoods of Boston, it begins with a childhood incident that returns to haunt them when, as adults, one of their own children is murdered ... Lehane's deceptive art lies not just in the exemplary investigative thriller but in a moving portrait of flawed people caught in a web of pain, told in lyrical prose that brings damaged lives and rundown cities to vivid life.Maxim Jakubowski, Review, 2001