In his last years, Steven P. Jobs veered from exotic diets to cutting-edge treatments as he fought the cancer that ultimately took his life, according to a new biography to be published on Monday.

His early decision to put off surgery and rely instead on fruit juices, acupuncture, herbal remedies and other treatments — some of which he found on the Internet — infuriated and distressed his family, friends and physicians, the book says. From the time of his first diagnosis in October 2003, until he received surgery in July 2004, he kept his condition largely private — secret from Apple employees, executives and shareholders, who were misled.

Although the broad outlines of Mr. Jobs’s struggle with pancreatic cancer are known, the new biography, by Walter Isaacson, offers new insight and details. Friends, family members and physicians spoke to Mr. Isaacson openly about Mr. Jobs’s illness and his shifting strategy for managing it. According to Mr. Isaacson, Mr. Jobs was one of 20 people in the world to have all the genes of his cancer tumor and his normal DNA sequenced. The price tag at the time: $100,000.

But the 630-page biography spans Mr. Jobs’s entire life, and also includes previously unknown details about his romantic life, his marriage, his relationship with his sister and his business dealings. Mr. Isaacson conducted more than 40 interviews over two years with Mr. Jobs, who died on Oct. 5.