Updated

Former Defense Secretary Robert Gates, in his upcoming memoir, has harsh words for President Obama’s leadership style and commitment to the Afghanistan war, accusing the president of losing faith in his own strategy.

“For him, it’s all about getting out,” he wrote.

The tone of Gates’ book is a break from Washington decorum, in which former Cabinet members rarely level tough judgments against sitting presidents.

Gates writes that by early 2010 he had concluded the president “doesn’t believe in his own strategy, and doesn’t consider the war to be his.”

The book, “Duty: Memoirs of a Secretary at War,” is scheduled for a Jan. 14 release by the Knopf DoubleDay Publishing Group. Excerpts, confirmed by Fox News, were first reported by The Washington Post and New York Times.

More On This...

    The 70-year-old Gates writes that Obama appeared to doubt his own strategy in Afghanistan to the point of being “outright convinced it would fail.”

    Obama deployed 30,000 more troops to stabilize Afghanistan before starting to remove soldiers in mid-2011, after months of tense discussion with Gates and other top advisers.

    Gates said he never doubted Obama’s support for the troops, “only his support for their mission.”

    In an essay Tuesday in the Wall Street Journal apparently to promote the book, Gates also writes that Obama’s “fundamental problem in Afghanistan was that his political and philosophical preferences for winding down the U.S. role conflicted with his own pro-war public rhetoric … the nearly unanimous recommendations of his senior civilian and military advisers at the departments of State and Defense, and the realities on the ground.”

    Gates, a carryover from the Bush administration who worked for every president since Nixon, except Clinton, said that underneath his notoriously calm exterior he was frequently “seething” because he felt Obama and his team had neither trust nor confidence in him.

    Despite his criticism of Obama, Gates writes about the commander in chief’s primary Afghanistan polices: “I believe Obama was right in each of these decisions.”

    And he writes approvingly about Obama in several other passages, calling him “a man of personal integrity.”

    He admits to having “a few issues” with George W. Bush and essentially wrote approvingly of then-Secretary of State Hillary Clinton, whom he described as being "smart, idealistic but pragmatic, tough-minded, indefatigable, funny, a very valuable colleague, and a superb representative of the United States all over the world.”

    However, Gates, who also worked at the CIA and National Security Council, is largely critical of Vice President Joe Biden, accusing him of “poisoning the well” for military leadership.

    At the White House, National Security Council spokeswoman Caitlin Hayden said in response to the book, “The president welcomes differences of view among his national security team, which broaden his options and enhance our policies.

    “The president disagrees with Secretary Gates’ assessment -- from his leadership on the Balkans in the Senate, to his efforts to end the war in Iraq, Joe Biden has been one of the leading statesmen of his time, and has helped advance America’s leadership in the world.”