Apple chief executive Tim Cook offered a part of his liver to a dying Steve Jobs, according to a new book due to be released this month.
The book, Becoming Steve Jobs, excerpts of which have been published online, throws light on life inside Apple as it grew into one of the world's most powerful technology companies.
It also charts the relationship between Cook and Jobs.
According to the book, Jobs angrily turned down Cook's offer.
In 2004, Jobs announced that he was suffering from pancreatic cancer and by 2009, the Apple chief executive was very ill, unable to come into the office and waiting for a liver transplant.
Cook regularly visited Jobs at home and after one visit he "left the house feeling so upset that he had his own blood tested", according to excerpts published by Fast Company executive editor Rick Tetzeli, who co-authored the book.
Fellow author Brent Schlender is a journalist who interviewed Jobs several times throughout his life.
Cook found out that he, like Steve Jobs, had a rare blood type, and guessed that it might be the same.
According to the book, he went through a series of tests and discovered that a partial liver transplant was feasible.
But when he shared the news with Jobs, the dying Apple boss reacted angrily, according to the book.
"He cut me off at the legs, almost before the words were out of my mouth," an excerpt says.
"'No," he said. 'I'll never let you do that. I'll never do that.'"
"Steve only yelled at me four or five times during the 13 years I knew him, and this was one of them," Cook added.
Jobs did go on to have a liver transplant, in March 2009.
He resigned as Apple chief executive in August 2011 and died in October at the age of 56.
The book also reveals that Jobs contemplated buying Yahoo as a way for Apple to get into the search business.
But parts of it contradict an earlier biography written by Walter Isaacson. In that book Isaacson claims that Apple was contemplating creating a television - but according to Becoming Steve Jobs, the Apple founder had little interest in this.
He tells Apple designer Jony Ive in the book: "I just don't like television. Apple will never make a TV again."