Karl Ove Knausgaard has written a six-volume literary epic based on his family and, in particular, his relationship with his father. It's a publishing sensation but half his family won't speak to him. So has it been worth it?

It is – I imagine – like mainlining literature; injecting into a major artery and feeling it pump urgently, unstoppably through your veins. Min Kamp, or My Struggle, has been the publishing sensation of the past two years in its native Norway. Its six volumes have sold nigh on half a million copies in a country of five million people. The opus has hijacked the Norwegian bestseller lists for months and won every prize going. It's been hailed around Europe as "unique", "extraordinary", "exceptional", "unparalleled", "a masterpiece", "a new way for literature to exist" and compared to Céline, Mann and (most often) Proust.

But literary landmark as it undeniably is, its author readily admits that the work's success is due at least in part to the scandal that's accompanied it. For Min Kamp is autobiography: a scorchingly honest, unflinchingly frank, hyperreal memoir of the life of one man and his family – and the family has not survived it intact.

Before 2009, Karl Ove Knausgaard, 43, was just a critically respected Norwegian novelist, author of the first debut novel to win the Norwegian Critics' prize and of a weird but widely admired book about angels called A Time to Every Purpose Under Heaven. Then he hit a block.

"I wanted to write something completely different, and I wanted to write about my father," he says. "About his fall, how he somehow changed from being a father, a perfectly ordinary teacher, a local politician, to a divorced, dead alcoholic. For three years I tried to write a kind of regular, realistic but fictional work about his death. Nothing worked."

Knausgaard had at that stage very nearly hit 40, the age at which his father left home and began drinking himself to death. It was ten years since his father had died. "That, I think, was the turning point," he says. "That realisation that I was as old as he was when he left home allowed me to write about him as an equal. Before, I think he had been like a kind of statue for me. And I started just writing it as it was: the truth, no artifice, no cleverness. Reality."

The writing flowed and fast: five pages a day, increasing to 20 by the end. Unconcerned with literary niceties such as a narrative arc, Knausgaard "developed a new kind of language almost, of the banality of the everyday. I could write about anything."

Passages of intense, almost hallucinatory detail emerged: painful, pin-sharp recollections of early childhood, a music-obsessed 70s adolescence, school, early fumblings with girls. Of an older, less complicated brother, a kind, loving but often somewhat absent mother; and of Knausgaard's father, a distant, unpredictable, sometimes harsh and often feared figure.

Everything went in as it happened. Nothing was changed, certainly not the names. It was high-risk: it could, the author admits, have been an artistic catastrophe. "I thought this was only interesting for me. I was ashamed even to show it to my editor," he says.

There was another reason to write with such ferocious frankness: "As a person, I'm polite – I want to please. One of the reasons for that is my father; he had that grip on me. For 40 years I'd lived that tension between my inner and outer selves. Suddenly now the point was not to please, it was to speak the truth. To write reality."

So he kept writing: his parents' divorce in his mid-teens, college, first marriage. Second marriage, fatherhood. His father's death – a gross, bloated, filthy man living in unimaginable squalor – bottles everywhere, soiled clothes, shit on the living-room sofa – who had, by then, moved back in with his mother, Knausgaard's grandmother, who was herself now incontinent, her mind wandering. About how he and his brother spent a week cleaning the place up, with bleach and Ajax and Jif and rubber gloves, from top to bottom.

After a few months, when he had 1,200 pages, he took them to his editor. They became volumes one and two of Min Kamp, and an instant sensation (the first, A Death in the Family, is published in the UK this month). Another year or so saw the remaining four volumes delivered and printed in Norway.

Long before that, though, the scandal had kicked off. "I wrote this in a kind of autistic mood," Knausgaard says. "Just me and my computer in a room, by myself. It never occurred to me that it might cause problems – I was just telling the truth, wasn't I? But I was also being very naive. I sent a copy to everyone involved before the first volume was published, and then I discovered how difficult this was going to be. It was like hell."

Knausgaard's father's family, furious, tried to stop publication, threatening to sue both publishing house and writer if the book went ahead. They objected to lots, but mainly to the portrait of his grandmother. "I said it was true, they said I was lying," Knausgaard says.

"I think ultimately it has to do with showing something that shouldn't be seen. Even though it's very common – everyone has an alcoholic in the family, everyone knows old people become incontinent. But they live in a small town, where life is partly about maintaining a facade. There was shame, I think. And they convinced themselves this was somehow about revenge, about something that happened in my teens. It wasn't, of course. I just wanted to understand my father."

With hindsight, Knausgaard says, he could perhaps "have gone a little easier on my grandmother. But not with my father. He had to be like he was. I still have dreams he's alive, you know. He's been dead 14 years and I still dream he comes back, and punishes me."

Knausgaard's uncle took the story to the press, and demanded the names of all the father's side of the family be changed, to which Knausgaard and his publishers, after taking legal advice, eventually agreed. "Every name," he says, "except my father's. I couldn't change that. So throughout the book he's 'Dad', or 'my father'." But it did mean that before the first volume was even published, Min Kamp had become, to put it mildly, a talking point.

After publication the scandal shifted up a gear. Television, radio and newspaper reporters interviewed not just everyone Knausgaard mentioned in the books, but pretty much everyone he had known since early childhood. "Should he have done it?" became a burning question discussed at supermarket checkouts, in cafes, across family dinner-tables. Norwegian companies were obliged to declare "Knausgaard-free days", when the subject was banned.

As a consequence of his project, Knausgaard says, his father's family now refuse to have any contact with him, or, sadly, with his brother. His ex-wife, although she had earlier said she was happy for him to write about her and to use her name, found the whole experience so difficult that she made a radio documentary about it.

His second wife, Linda, a writer with whom he lives in Sweden, "was more difficult. She had said: 'Do it, just don't make me boring. Use my name.' Then when the manuscript was done she read it, on a long train journey to Stockholm. She called once to say it was OK. Then she called again and said our life together could never be romantic ever again; this was all so frank. Then she called a third time, and cried."

The couple went through "a deep crisis" following publication, Knausgaard says. "You know, in every couple there are things you don't talk about, and I did. So it was very difficult. But we are adapting. We are still together."

Their three children, Vamja, Heidi and John, now aged eight, six and four, are also a real worry. "It's not what I wrote about them," Knausgaard says. "They are children; innocent. And of course I didn't write this to harm them. But I am worried about what they will learn about their father, later. How will they respond to what they read? I am very ambivalent about that. But a while back I met the daughter of a very well-known Swedish writer, and she said she had grown up in exactly this situation – and after her father died, they were all happy to have the books he had written. They were like a gift, because he was still there, in their lives. So I don't know."

So should he have done it? "If I had known then what I know now, then no, definitely no, I wouldn't dare," Knausgaard says. "But I'm glad I did. And I couldn't have done it any other way. I will never do anything like this again, though, for sure. I have given away my soul, in a way."

Was it worth it? Worth the furore, the upset, the anguish, the ostracisation? "Well that's the big question, obviously," he says. "Do you think your literature is worth your uncle, or whoever? Is literature more important than hurting people? You can't argue that. You can't say it. It's impossible. But you can write about yourself and about your father. That's my defence in all this. I did this with a pure heart. He brought me to life, he did these things to me ... Danger, it seems to me, is in action, what people do, not in telling, what they say. As long as this isn't a hate project; as long as I am trying to tell things how they really are."

The "most truth", Knausgaard says, was reserved for his father and grandmother – both now dead for more than 10 years. In the last four of Min Kamp's six volumes, Knausgaard adopted a distanced, reserved and remote tone, and safer territory – his own childhood and teenage years. "The real danger is in writing about more recent times," he says. "I also wrote about my mother, you know, but much less. Because she is still alive. I couldn't go there."

So there is, he concludes, a measure of guilt – not least that his project has made him a wealthy man, allowing him to buy a house, start up a small publishing house printing translations of foreign books he really wants to see in Norwegian. "That makes me ambivalent," he says. "I get the rewards; the people I wrote about get the hurt."

But, at root, it was something he had to do. "The thing is," he says, "I was there, turning 40. I had a beautiful wife, three beautiful kids, I loved them all. But still I wasn't truly happy. It's not necessarily the curse of the writer, this. But maybe it's the curse of the writer to be aware of it, to ask: why is all this, all I've got, not enough? That's really what I'm searching for, in this whole thing, an answer to that question. My intention, throughout, has been to write literature."

• A Death in the Family by Karl Ove Knausgaard is published by Harvill Secker, £17.99. To order a copy for £14.39, including free UK P&P, go to theguardian.com/bookshop or call 0330 333 6846

• This article was amended on 12 March 2012. The original said that it [nearing 40] was exactly the age at which his father drank himself to death nearly 10 years previously. This paragraph has been clarified.