In 2009, when Steve Jobs was in his final years, dying of cancer, Tim Cook offered his boss a piece of his liver.

That's according to an excerpt of an upcoming biography on the Apple (AAPL) founder, "Becoming Steve Jobs." Several excerpts were published in Fast Company this week.

Cook, concerned about Jobs' frail condition, went to get his blood tested, according to the biography. It turned out that his blood type matched Jobs'. Upon further investigation, Cook's doctors determined that he could donate Jobs a piece of his liver, and the transfer had a high likelihood of success -- for both patients.

Livers are regenerative organs, so Cook's liver would have regrown to full size, as would have the piece of liver that Cook donated to Jobs.

But Jobs refused, the biographer says.

"'He cut me off at the legs, almost before the words were out of my mouth,' said Cook. 'No,' he said. 'I'll never let you do that. I'll never do that.'"

Jobs ultimately got a life-saving liver transplant. He ultimately died of cancer in 2011.

Cook called Jobs' decision to refuse his liver unselfish.

"Steve only yelled at me four or five times during the 13 years I knew him, and this was one of them," Cook said.