The widow of the late Iain Banks, who died at the age of 59, has written about how he wrote his last book, The Quarry, which is published this week.

Adele Hartley, who married the writer of fiction and science fiction shortly after he announced in April that he had cancer, said his final novel is beautiful and "all the more devastating because in the end Iain came to know his character's story just a little too well".

The Quarry centres around the story of Guy, a man dying of cancer – but its story was not inspired by the writer's own illness, she writes.

She says, on the website Banksophilia, which was set up to record the messages of fans and also impart information about the author's illness: "Iain's story became something you could never put in a book – certainly something he never would have.

"He was horrified at the idea of putting a person or event from his real life directly into any work of fiction as it would have been a slight on the power of his imagination.

"Had he known he had cancer, he would never have written about it."

The Herald's literary editor, Rosemary Goring, reviewed the book and said it had passage of "throat-catching pathos" and adds: "The Quarry reaches a pitch of emotion that only a reader made of granite could read without tears."

Banks, who died on June 9, conceived his final book, to be published by Little Brown, in the early summer of last year, Ms Hartley says, and plotted it through the autumn.

Ms Hartley writes: "There were so many moments in our life together when we'd look at something or overhear something and say to each other 'you could never put that in a book' quite simply because no-one would believe that it was likely or possible.

"Real life can be funny like that."

She concludes: "The vicious irony of the situation wasn't lost on either one of us."