Jonathan Franzen's latest novel, Purity, is partly set in Santa Cruz, a California town 100km south of San Francisco, where the novelist lives with his partner. Their house is in the U-bend of a crescent, on the edge of a suburban housing estate, overlooking a wooded conservation area to the Pacific Ocean beyond.

It is, for one of America's foremost literary novelists, a modest property, overlooked on three sides by neighbours in a way that, say, Philip Roth's estate in Connecticut is not. However, it affords good views from the deck (the novelist is an avid birdwatcher), and the low overheads permit Franzen to let five years go by without delivering a novel.

"I'm not used to talking about this book," he says of Purity, which, like his preceding two novels, is a 600-page doorstopper. There is a long, Franzenian pause: "I'm trying to figure out how much I should say and how much I should not say."

That question, as central to the writing as to the publicising of the novel, is one that Franzen has frequently struggled to answer. At 56, he has the earnest, slightly puggish look of a younger man, and the occasional intemperance of one, too. His fame has as much to do with the fights he has picked - or has had foisted upon him - as with the quality of his fiction; Franzen riles people in a way that is unusual, and perhaps reassuring for a novelist, given the endless debate about the relevance of that role. He has attracted the scorn, over the years, of users of social media, environmentalists, certain stripes of feminist critic, lesser novelists, the lead book reviewer of The New York Times and fans of Oprah Winfrey.

Franzen says he is "hurt" and "ashamed" to be the target of such ire, but he is also unrepentant. No sooner has one controversy died down than another pops up in its place, most recently in the wake of a long piece he wrote in The New Yorker in April, suggesting that, contrary to research published by the bird charity the National Audubon Society, climate change is not the greatest threat to avian welfare, but more immediate dangers such as hunting and collision with glass. The society accused him of "intellectual dishonesty", and its members attacked him online, an unpleasant but also, perhaps, a bleakly satisfying experience: the incident foreshadowed the themes of Franzen's new novel.

Purity is the story of Pip, a girl in her early 20s, and a Julian Assange-type character called Andreas Wolf, who runs a rival organisation to WikiLeaks called the Sunlight Project. Internet culture, in some ways, is perfect fodder for Franzen, who is never stronger than when calling out the gap between how we see ourselves and how others see us - a gap wherein so much of online life now resides. But it is also an odd fit: a novel about technology by someone who doesn't like using it. Many years ago, Franzen spoke about jamming the USB port on his computer to get stuff done, and more recently scolded Salman Rushdie for wasting time on Twitter. This distaste is in part aesthetic - the very brevity of Twitter offends Franzen - and partly a reaction against what he calls the "totalitarianism" of online culture, wherein retribution by a mob can be vast, swift and violently misinformed.

The irony of all this is that Franzen, a white male novelist frequently accused of elitism, is, in this scenario, something of an underdog, the nerd repeatedly beaten up by the cool kids online - although he identifies the real villain of the piece as the internet itself, which he compares in Purity to communist East Germany. "You can't not have a relation to, in the case of East Germany, the socialism of the state," Franzen says. "In the case of the internet, you can ignore it, or you can abet it. Either way, you are in a relation to it. And that's what's totalitarian."

Franzen is pained and baffled when he hears himself described as misanthropic. "I don't dislike people; I love people," he says to me at one point, and there is a line in Purity, applied to a character called Anabel, that could be the author addressing himself: "She kept alienating people with her moral absolutism and her sense of superiority, which is so often the secret heart of shyness."

Everything changed with The Corrections, Franzen's novel of the family Lambert: Enid and Alfred, the warring old couple, and their three dysfunctional adult children. The fictional family bore strong similarities to Franzen's own - his father a railway engineer, his mother a housewife, although, he says, as "writing becomes more autobiographical, the less it hews to actual lived experience. The text takes on meaning when you start to depart from experience. Because then it starts to tap into the writer's nature."

The Corrections was published in 2001, when Franzen was 42, and has sold more than three million copies.

For the past 13 years, Franzen has lived with Kathryn Chetkovich, a writer and editor whom he persuaded to move in with him four months after The Corrections came out, and with whom, says Franzen, "I'm never bored". As an editor, Chetkovich mostly works with social scientists. "She helps them think better. She knows a lot of stuff. And it's hard to get away with a specious argument in her presence. I don't think I could live with someone that I didn't have an intellectual friendship with. Maybe a dog."

For 14 years, from his early 20s onwards, he was married to another writer, Valerie Cornell. With all the caveats about autobiography in place, elements of the experience clearly inform parts of Purity. While sections of the new novel (and Franzen's previous one, Freedom) read like an intellectual exercise, the car crash of Tom and Anabel's marriage is straightforwardly brilliant, captivating, unbearable.

"A little bit funny?" he says, anxiously.

Hilarious.

"Good."

It struck Franzen that no one had really done "the entire slow-motion train wreck in all its brutality". He is terrific at arguments - that terrible, slow suck into someone else's version of reality, wherein, as Tom says, "every utterance of hers gave me multiple options for response, each of which would prompt a different utterance, to which, again, I would have multiple options in responding, and I knew how quickly I could be led eight or 10 steps out on to some dangerous tree branch and what a despair-inducingly slow job it was to retrace my steps back up the branch to a neutral starting point".

Cannily, given how much of the storyline he is made to shoulder, the Andreas Wolf character is positioned as a pre-internet creature, born and raised in communist East Germany, with a commensurate understanding of how systems that claim to liberate human potential can actually constrain it. The apex of the book is an extraordinary rant Wolf goes on against what he calls the New Regime - coincidentally, an echo of remarks made by Assange himself in his 2012 book of essays, in which the WikiLeaks founder warned that the internet could be turned into a "dangerous facilitator of totalitarianism".

Assange was mainly talking about surveillance technologies. In Purity, Franzen's critique is much broader. "Smart people were actually far more terrified of the New Regime than of what the regime had persuaded less-smart people to be afraid of, the NSA, the CIA," rages Wolf in the novel. "It was straight from the totalitarian playbook, disavowing your own methods of terror by imputing them to your enemy and presenting yourself as the only defence against them - and most of the would-be Snowdens kept their mouth shut."

So what about social media? Do those curating their Facebook and Instagram feeds experience a measure of the satisfaction the writer gets from producing an essay? What of the democratising value of these platforms to marginalised voices? Franzen looks weary. "I'm frequently cast as someone who says it's all bad, but I'm not that person. That goes on the positive side of the ledger and all these other things are on the negative side. And admittedly there's a bias at work here, in that I am part of the writer tribe and my friends are good writers. And I have a concern for younger writers coming up into this world - what they are being made to do."

He thinks for a moment. "It may even be, as you say, a democratising thing, and from a utilitarian standpoint, it might, in this respect, be a positive development. But I'm not trying to maximise everyone's happiness. I'm trying to keep alive the kind of writing that I enjoy."

There is a Facebook account bearing his name that he made a few updates to in the autumn of 2007, since taken over by his publishers. It has 42,000 "likes". Franzen has been forced to take down several fake Twitter accounts, "because I've had this problem with people impersonating me, not in a parodic way. And it's actually not straightforward to have them taken down. I have to photograph myself holding my passport to my face." He looks pained.

"I didn't even know how to look at Twitter. People sometimes copy things from Twitter and send them to me. But don't you have to sign up?"